Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1 | { |
| 2 | "program" : "wcmp.p4", |
| 3 | "__meta__" : { |
| 4 | "version" : [2, 7], |
| 5 | "compiler" : "https://github.com/p4lang/p4c" |
| 6 | }, |
| 7 | "header_types" : [ |
| 8 | { |
| 9 | "name" : "scalars_0", |
| 10 | "id" : 0, |
| 11 | "fields" : [ |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 12 | ["tmp_0", 104, false], |
| 13 | ["tmp", 8, false], |
| 14 | ["tmp_1", 32, false], |
| 15 | ["tmp_2", 32, false] |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 16 | ] |
| 17 | }, |
| 18 | { |
| 19 | "name" : "ethernet_t", |
| 20 | "id" : 1, |
| 21 | "fields" : [ |
| 22 | ["dstAddr", 48, false], |
| 23 | ["srcAddr", 48, false], |
| 24 | ["etherType", 16, false] |
| 25 | ] |
| 26 | }, |
| 27 | { |
| 28 | "name" : "ipv4_t", |
| 29 | "id" : 2, |
| 30 | "fields" : [ |
| 31 | ["version", 4, false], |
| 32 | ["ihl", 4, false], |
| 33 | ["diffserv", 8, false], |
| 34 | ["totalLen", 16, false], |
| 35 | ["identification", 16, false], |
| 36 | ["flags", 3, false], |
| 37 | ["fragOffset", 13, false], |
| 38 | ["ttl", 8, false], |
| 39 | ["protocol", 8, false], |
| 40 | ["hdrChecksum", 16, false], |
| 41 | ["srcAddr", 32, false], |
| 42 | ["dstAddr", 32, false] |
| 43 | ] |
| 44 | }, |
| 45 | { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 46 | "name" : "packet_in_t", |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 47 | "id" : 3, |
| 48 | "fields" : [ |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 49 | ["ingress_port", 9, false], |
| 50 | ["_padding", 7, false] |
| 51 | ] |
| 52 | }, |
| 53 | { |
| 54 | "name" : "packet_out_t", |
| 55 | "id" : 4, |
| 56 | "fields" : [ |
| 57 | ["egress_port", 9, false], |
| 58 | ["_padding_0", 7, false] |
| 59 | ] |
| 60 | }, |
| 61 | { |
| 62 | "name" : "tcp_t", |
| 63 | "id" : 5, |
| 64 | "fields" : [ |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 65 | ["srcPort", 16, false], |
| 66 | ["dstPort", 16, false], |
| 67 | ["seqNo", 32, false], |
| 68 | ["ackNo", 32, false], |
| 69 | ["dataOffset", 4, false], |
| 70 | ["res", 3, false], |
| 71 | ["ecn", 3, false], |
| 72 | ["ctrl", 6, false], |
| 73 | ["window", 16, false], |
| 74 | ["checksum", 16, false], |
| 75 | ["urgentPtr", 16, false] |
| 76 | ] |
| 77 | }, |
| 78 | { |
| 79 | "name" : "udp_t", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 80 | "id" : 6, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 81 | "fields" : [ |
| 82 | ["srcPort", 16, false], |
| 83 | ["dstPort", 16, false], |
| 84 | ["length_", 16, false], |
| 85 | ["checksum", 16, false] |
| 86 | ] |
| 87 | }, |
| 88 | { |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 89 | "name" : "wcmp_meta_t", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 90 | "id" : 7, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 91 | "fields" : [ |
| 92 | ["groupId", 16, false], |
| 93 | ["numBits", 8, false], |
| 94 | ["selector", 32, false] |
| 95 | ] |
| 96 | }, |
| 97 | { |
| 98 | "name" : "standard_metadata", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 99 | "id" : 8, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 100 | "fields" : [ |
| 101 | ["ingress_port", 9, false], |
| 102 | ["egress_spec", 9, false], |
| 103 | ["egress_port", 9, false], |
| 104 | ["clone_spec", 32, false], |
| 105 | ["instance_type", 32, false], |
| 106 | ["drop", 1, false], |
| 107 | ["recirculate_port", 16, false], |
| 108 | ["packet_length", 32, false], |
| 109 | ["enq_timestamp", 32, false], |
| 110 | ["enq_qdepth", 19, false], |
| 111 | ["deq_timedelta", 32, false], |
| 112 | ["deq_qdepth", 19, false], |
| 113 | ["ingress_global_timestamp", 48, false], |
| 114 | ["lf_field_list", 32, false], |
| 115 | ["mcast_grp", 16, false], |
| 116 | ["resubmit_flag", 1, false], |
| 117 | ["egress_rid", 16, false], |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 118 | ["_padding_1", 5, false] |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 119 | ] |
| 120 | } |
| 121 | ], |
| 122 | "headers" : [ |
| 123 | { |
| 124 | "name" : "scalars", |
| 125 | "id" : 0, |
| 126 | "header_type" : "scalars_0", |
| 127 | "metadata" : true, |
| 128 | "pi_omit" : true |
| 129 | }, |
| 130 | { |
| 131 | "name" : "standard_metadata", |
| 132 | "id" : 1, |
| 133 | "header_type" : "standard_metadata", |
| 134 | "metadata" : true, |
| 135 | "pi_omit" : true |
| 136 | }, |
| 137 | { |
| 138 | "name" : "ethernet", |
| 139 | "id" : 2, |
| 140 | "header_type" : "ethernet_t", |
| 141 | "metadata" : false, |
| 142 | "pi_omit" : true |
| 143 | }, |
| 144 | { |
| 145 | "name" : "ipv4", |
| 146 | "id" : 3, |
| 147 | "header_type" : "ipv4_t", |
| 148 | "metadata" : false, |
| 149 | "pi_omit" : true |
| 150 | }, |
| 151 | { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 152 | "name" : "packet_in_hdr", |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 153 | "id" : 4, |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 154 | "header_type" : "packet_in_t", |
| 155 | "metadata" : false, |
| 156 | "pi_omit" : true |
| 157 | }, |
| 158 | { |
| 159 | "name" : "packet_out_hdr", |
| 160 | "id" : 5, |
| 161 | "header_type" : "packet_out_t", |
| 162 | "metadata" : false, |
| 163 | "pi_omit" : true |
| 164 | }, |
| 165 | { |
| 166 | "name" : "tcp", |
| 167 | "id" : 6, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 168 | "header_type" : "tcp_t", |
| 169 | "metadata" : false, |
| 170 | "pi_omit" : true |
| 171 | }, |
| 172 | { |
| 173 | "name" : "udp", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 174 | "id" : 7, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 175 | "header_type" : "udp_t", |
| 176 | "metadata" : false, |
| 177 | "pi_omit" : true |
| 178 | }, |
| 179 | { |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 180 | "name" : "wcmp_meta", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 181 | "id" : 8, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 182 | "header_type" : "wcmp_meta_t", |
| 183 | "metadata" : true, |
| 184 | "pi_omit" : true |
| 185 | } |
| 186 | ], |
| 187 | "header_stacks" : [], |
| 188 | "header_union_types" : [], |
| 189 | "header_unions" : [], |
| 190 | "header_union_stacks" : [], |
| 191 | "field_lists" : [], |
| 192 | "errors" : [ |
| 193 | ["NoError", 1], |
| 194 | ["PacketTooShort", 2], |
| 195 | ["NoMatch", 3], |
| 196 | ["StackOutOfBounds", 4], |
| 197 | ["HeaderTooShort", 5], |
| 198 | ["ParserTimeout", 6] |
| 199 | ], |
| 200 | "enums" : [], |
| 201 | "parsers" : [ |
| 202 | { |
| 203 | "name" : "parser", |
| 204 | "id" : 0, |
| 205 | "init_state" : "start", |
| 206 | "parse_states" : [ |
| 207 | { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 208 | "name" : "default_parser", |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 209 | "id" : 0, |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 210 | "parser_ops" : [], |
| 211 | "transitions" : [ |
| 212 | { |
| 213 | "value" : "0x00ff", |
| 214 | "mask" : null, |
| 215 | "next_state" : "parse_pkt_out" |
| 216 | }, |
| 217 | { |
| 218 | "value" : "default", |
| 219 | "mask" : null, |
| 220 | "next_state" : "parse_ethernet" |
| 221 | } |
| 222 | ], |
| 223 | "transition_key" : [ |
| 224 | { |
| 225 | "type" : "field", |
| 226 | "value" : ["standard_metadata", "ingress_port"] |
| 227 | } |
| 228 | ] |
| 229 | }, |
| 230 | { |
| 231 | "name" : "parse_ethernet", |
| 232 | "id" : 1, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 233 | "parser_ops" : [ |
| 234 | { |
| 235 | "parameters" : [ |
| 236 | { |
| 237 | "type" : "regular", |
| 238 | "value" : "ethernet" |
| 239 | } |
| 240 | ], |
| 241 | "op" : "extract" |
| 242 | } |
| 243 | ], |
| 244 | "transitions" : [ |
| 245 | { |
| 246 | "value" : "0x0800", |
| 247 | "mask" : null, |
| 248 | "next_state" : "parse_ipv4" |
| 249 | }, |
| 250 | { |
| 251 | "value" : "default", |
| 252 | "mask" : null, |
| 253 | "next_state" : null |
| 254 | } |
| 255 | ], |
| 256 | "transition_key" : [ |
| 257 | { |
| 258 | "type" : "field", |
| 259 | "value" : ["ethernet", "etherType"] |
| 260 | } |
| 261 | ] |
| 262 | }, |
| 263 | { |
| 264 | "name" : "parse_ipv4", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 265 | "id" : 2, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 266 | "parser_ops" : [ |
| 267 | { |
| 268 | "parameters" : [ |
| 269 | { |
| 270 | "type" : "regular", |
| 271 | "value" : "ipv4" |
| 272 | } |
| 273 | ], |
| 274 | "op" : "extract" |
| 275 | } |
| 276 | ], |
| 277 | "transitions" : [ |
| 278 | { |
| 279 | "value" : "0x000006", |
| 280 | "mask" : null, |
| 281 | "next_state" : "parse_tcp" |
| 282 | }, |
| 283 | { |
| 284 | "value" : "0x000011", |
| 285 | "mask" : null, |
| 286 | "next_state" : "parse_udp" |
| 287 | }, |
| 288 | { |
| 289 | "value" : "default", |
| 290 | "mask" : null, |
| 291 | "next_state" : null |
| 292 | } |
| 293 | ], |
| 294 | "transition_key" : [ |
| 295 | { |
| 296 | "type" : "field", |
| 297 | "value" : ["ipv4", "fragOffset"] |
| 298 | }, |
| 299 | { |
| 300 | "type" : "field", |
| 301 | "value" : ["ipv4", "protocol"] |
| 302 | } |
| 303 | ] |
| 304 | }, |
| 305 | { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 306 | "name" : "parse_pkt_in", |
| 307 | "id" : 3, |
| 308 | "parser_ops" : [ |
| 309 | { |
| 310 | "parameters" : [ |
| 311 | { |
| 312 | "type" : "regular", |
| 313 | "value" : "packet_in_hdr" |
| 314 | } |
| 315 | ], |
| 316 | "op" : "extract" |
| 317 | } |
| 318 | ], |
| 319 | "transitions" : [ |
| 320 | { |
| 321 | "value" : "default", |
| 322 | "mask" : null, |
| 323 | "next_state" : "parse_ethernet" |
| 324 | } |
| 325 | ], |
| 326 | "transition_key" : [] |
| 327 | }, |
| 328 | { |
| 329 | "name" : "parse_pkt_out", |
| 330 | "id" : 4, |
| 331 | "parser_ops" : [ |
| 332 | { |
| 333 | "parameters" : [ |
| 334 | { |
| 335 | "type" : "regular", |
| 336 | "value" : "packet_out_hdr" |
| 337 | } |
| 338 | ], |
| 339 | "op" : "extract" |
| 340 | } |
| 341 | ], |
| 342 | "transitions" : [ |
| 343 | { |
| 344 | "value" : "default", |
| 345 | "mask" : null, |
| 346 | "next_state" : "parse_ethernet" |
| 347 | } |
| 348 | ], |
| 349 | "transition_key" : [] |
| 350 | }, |
| 351 | { |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 352 | "name" : "parse_tcp", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 353 | "id" : 5, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 354 | "parser_ops" : [ |
| 355 | { |
| 356 | "parameters" : [ |
| 357 | { |
| 358 | "type" : "regular", |
| 359 | "value" : "tcp" |
| 360 | } |
| 361 | ], |
| 362 | "op" : "extract" |
| 363 | } |
| 364 | ], |
| 365 | "transitions" : [ |
| 366 | { |
| 367 | "value" : "default", |
| 368 | "mask" : null, |
| 369 | "next_state" : null |
| 370 | } |
| 371 | ], |
| 372 | "transition_key" : [] |
| 373 | }, |
| 374 | { |
| 375 | "name" : "parse_udp", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 376 | "id" : 6, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 377 | "parser_ops" : [ |
| 378 | { |
| 379 | "parameters" : [ |
| 380 | { |
| 381 | "type" : "regular", |
| 382 | "value" : "udp" |
| 383 | } |
| 384 | ], |
| 385 | "op" : "extract" |
| 386 | } |
| 387 | ], |
| 388 | "transitions" : [ |
| 389 | { |
| 390 | "value" : "default", |
| 391 | "mask" : null, |
| 392 | "next_state" : null |
| 393 | } |
| 394 | ], |
| 395 | "transition_key" : [] |
| 396 | }, |
| 397 | { |
| 398 | "name" : "start", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 399 | "id" : 7, |
| 400 | "parser_ops" : [ |
| 401 | { |
| 402 | "parameters" : [ |
| 403 | { |
| 404 | "type" : "field", |
| 405 | "value" : ["scalars", "tmp_0"] |
| 406 | }, |
| 407 | { |
| 408 | "type" : "lookahead", |
| 409 | "value" : [0, 104] |
| 410 | } |
| 411 | ], |
| 412 | "op" : "set" |
| 413 | }, |
| 414 | { |
| 415 | "parameters" : [ |
| 416 | { |
| 417 | "type" : "field", |
| 418 | "value" : ["scalars", "tmp"] |
| 419 | }, |
| 420 | { |
| 421 | "type" : "expression", |
| 422 | "value" : { |
| 423 | "type" : "expression", |
| 424 | "value" : { |
| 425 | "op" : "&", |
| 426 | "left" : { |
| 427 | "type" : "field", |
| 428 | "value" : ["scalars", "tmp_0"] |
| 429 | }, |
| 430 | "right" : { |
| 431 | "type" : "hexstr", |
| 432 | "value" : "0xff" |
| 433 | } |
| 434 | } |
| 435 | } |
| 436 | } |
| 437 | ], |
| 438 | "op" : "set" |
| 439 | } |
| 440 | ], |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 441 | "transitions" : [ |
| 442 | { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 443 | "value" : "0x00", |
| 444 | "mask" : null, |
| 445 | "next_state" : "parse_pkt_in" |
| 446 | }, |
| 447 | { |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 448 | "value" : "default", |
| 449 | "mask" : null, |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 450 | "next_state" : "default_parser" |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 451 | } |
| 452 | ], |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 453 | "transition_key" : [ |
| 454 | { |
| 455 | "type" : "field", |
| 456 | "value" : ["scalars", "tmp"] |
| 457 | } |
| 458 | ] |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 459 | } |
| 460 | ] |
| 461 | } |
| 462 | ], |
| 463 | "deparsers" : [ |
| 464 | { |
| 465 | "name" : "deparser", |
| 466 | "id" : 0, |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 467 | "order" : ["packet_out_hdr", "packet_in_hdr", "ethernet", "ipv4", "udp", "tcp"] |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 468 | } |
| 469 | ], |
| 470 | "meter_arrays" : [], |
| 471 | "counter_arrays" : [ |
| 472 | { |
| 473 | "name" : "table0_counter", |
| 474 | "id" : 0, |
| 475 | "is_direct" : true, |
| 476 | "binding" : "table0" |
| 477 | }, |
| 478 | { |
| 479 | "name" : "wcmp_group_table_counter", |
| 480 | "id" : 1, |
| 481 | "is_direct" : true, |
| 482 | "binding" : "wcmp_group_table" |
| 483 | }, |
| 484 | { |
| 485 | "name" : "egress_port_counter", |
| 486 | "id" : 2, |
| 487 | "size" : 254, |
| 488 | "is_direct" : false |
| 489 | }, |
| 490 | { |
| 491 | "name" : "ingress_port_counter", |
| 492 | "id" : 3, |
| 493 | "size" : 254, |
| 494 | "is_direct" : false |
| 495 | } |
| 496 | ], |
| 497 | "register_arrays" : [], |
| 498 | "calculations" : [ |
| 499 | { |
| 500 | "name" : "calc", |
| 501 | "id" : 0, |
| 502 | "algo" : "crc32", |
| 503 | "input" : [ |
| 504 | { |
| 505 | "type" : "field", |
| 506 | "value" : ["ipv4", "srcAddr"] |
| 507 | }, |
| 508 | { |
| 509 | "type" : "field", |
| 510 | "value" : ["ipv4", "dstAddr"] |
| 511 | }, |
| 512 | { |
| 513 | "type" : "field", |
| 514 | "value" : ["ipv4", "protocol"] |
| 515 | }, |
| 516 | { |
| 517 | "type" : "field", |
| 518 | "value" : ["tcp", "srcPort"] |
| 519 | }, |
| 520 | { |
| 521 | "type" : "field", |
| 522 | "value" : ["tcp", "dstPort"] |
| 523 | }, |
| 524 | { |
| 525 | "type" : "field", |
| 526 | "value" : ["udp", "srcPort"] |
| 527 | }, |
| 528 | { |
| 529 | "type" : "field", |
| 530 | "value" : ["udp", "dstPort"] |
| 531 | } |
| 532 | ] |
| 533 | } |
| 534 | ], |
| 535 | "learn_lists" : [], |
| 536 | "actions" : [ |
| 537 | { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 538 | "name" : "add_packet_in_hdr", |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 539 | "id" : 0, |
| 540 | "runtime_data" : [], |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 541 | "primitives" : [ |
| 542 | { |
| 543 | "op" : "add_header", |
| 544 | "parameters" : [ |
| 545 | { |
| 546 | "type" : "header", |
| 547 | "value" : "packet_in_hdr" |
| 548 | } |
| 549 | ], |
| 550 | "source_info" : { |
| 551 | "filename" : "include/packet_io.p4", |
| 552 | "line" : 25, |
| 553 | "column" : 4, |
| 554 | "source_fragment" : "add_header(packet_in_hdr)" |
| 555 | } |
| 556 | }, |
| 557 | { |
| 558 | "op" : "assign", |
| 559 | "parameters" : [ |
| 560 | { |
| 561 | "type" : "field", |
| 562 | "value" : ["packet_in_hdr", "ingress_port"] |
| 563 | }, |
| 564 | { |
| 565 | "type" : "field", |
| 566 | "value" : ["standard_metadata", "ingress_port"] |
| 567 | } |
| 568 | ], |
| 569 | "source_info" : { |
| 570 | "filename" : "include/packet_io.p4", |
| 571 | "line" : 26, |
| 572 | "column" : 4, |
| 573 | "source_fragment" : "modify_field(packet_in_hdr.ingress_port, standard_metadata.ingress_port)" |
| 574 | } |
| 575 | } |
| 576 | ] |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 577 | }, |
| 578 | { |
| 579 | "name" : "NoAction", |
| 580 | "id" : 1, |
| 581 | "runtime_data" : [], |
| 582 | "primitives" : [] |
| 583 | }, |
| 584 | { |
| 585 | "name" : "NoAction", |
| 586 | "id" : 2, |
| 587 | "runtime_data" : [], |
| 588 | "primitives" : [] |
| 589 | }, |
| 590 | { |
| 591 | "name" : "NoAction", |
| 592 | "id" : 3, |
| 593 | "runtime_data" : [], |
| 594 | "primitives" : [] |
| 595 | }, |
| 596 | { |
| 597 | "name" : "wcmp_set_selector", |
| 598 | "id" : 4, |
| 599 | "runtime_data" : [], |
| 600 | "primitives" : [ |
| 601 | { |
| 602 | "op" : "assign", |
| 603 | "parameters" : [ |
| 604 | { |
| 605 | "type" : "field", |
| 606 | "value" : ["wcmp_meta", "selector"] |
| 607 | }, |
| 608 | { |
| 609 | "type" : "expression", |
| 610 | "value" : { |
| 611 | "type" : "expression", |
| 612 | "value" : { |
| 613 | "op" : "&", |
| 614 | "left" : { |
| 615 | "type" : "expression", |
| 616 | "value" : { |
| 617 | "op" : "&", |
| 618 | "left" : { |
| 619 | "type" : "expression", |
| 620 | "value" : { |
| 621 | "op" : "<<", |
| 622 | "left" : { |
| 623 | "type" : "expression", |
| 624 | "value" : { |
| 625 | "op" : "&", |
| 626 | "left" : { |
| 627 | "type" : "expression", |
| 628 | "value" : { |
| 629 | "op" : "+", |
| 630 | "left" : { |
| 631 | "type" : "expression", |
| 632 | "value" : { |
| 633 | "op" : "&", |
| 634 | "left" : { |
| 635 | "type" : "expression", |
| 636 | "value" : { |
| 637 | "op" : "<<", |
| 638 | "left" : { |
| 639 | "type" : "hexstr", |
| 640 | "value" : "0x01" |
| 641 | }, |
| 642 | "right" : { |
| 643 | "type" : "field", |
| 644 | "value" : ["wcmp_meta", "numBits"] |
| 645 | } |
| 646 | } |
| 647 | }, |
| 648 | "right" : { |
| 649 | "type" : "hexstr", |
| 650 | "value" : "0xff" |
| 651 | } |
| 652 | } |
| 653 | }, |
| 654 | "right" : { |
| 655 | "type" : "hexstr", |
| 656 | "value" : "0xff" |
| 657 | } |
| 658 | } |
| 659 | }, |
| 660 | "right" : { |
| 661 | "type" : "hexstr", |
| 662 | "value" : "0xff" |
| 663 | } |
| 664 | } |
| 665 | }, |
| 666 | "right" : { |
| 667 | "type" : "expression", |
| 668 | "value" : { |
| 669 | "op" : "&", |
| 670 | "left" : { |
| 671 | "type" : "expression", |
| 672 | "value" : { |
| 673 | "op" : "-", |
| 674 | "left" : { |
| 675 | "type" : "hexstr", |
| 676 | "value" : "0x20" |
| 677 | }, |
| 678 | "right" : { |
| 679 | "type" : "field", |
| 680 | "value" : ["wcmp_meta", "numBits"] |
| 681 | } |
| 682 | } |
| 683 | }, |
| 684 | "right" : { |
| 685 | "type" : "hexstr", |
| 686 | "value" : "0xff" |
| 687 | } |
| 688 | } |
| 689 | } |
| 690 | } |
| 691 | }, |
| 692 | "right" : { |
| 693 | "type" : "hexstr", |
| 694 | "value" : "0xff" |
| 695 | } |
| 696 | } |
| 697 | }, |
| 698 | "right" : { |
| 699 | "type" : "hexstr", |
| 700 | "value" : "0xffffffff" |
| 701 | } |
| 702 | } |
| 703 | } |
| 704 | } |
| 705 | ], |
| 706 | "source_info" : { |
| 707 | "filename" : "wcmp.p4", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 708 | "line" : 44, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 709 | "column" : 4, |
| 710 | "source_fragment" : "modify_field(wcmp_meta.selector, ..." |
| 711 | } |
| 712 | } |
| 713 | ] |
| 714 | }, |
| 715 | { |
| 716 | "name" : "set_egress_port", |
| 717 | "id" : 5, |
| 718 | "runtime_data" : [ |
| 719 | { |
| 720 | "name" : "port", |
| 721 | "bitwidth" : 9 |
| 722 | } |
| 723 | ], |
| 724 | "primitives" : [ |
| 725 | { |
| 726 | "op" : "assign", |
| 727 | "parameters" : [ |
| 728 | { |
| 729 | "type" : "field", |
| 730 | "value" : ["standard_metadata", "egress_spec"] |
| 731 | }, |
| 732 | { |
| 733 | "type" : "runtime_data", |
| 734 | "value" : 0 |
| 735 | } |
| 736 | ], |
| 737 | "source_info" : { |
| 738 | "filename" : "include/actions.p4", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 739 | "line" : 5, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 740 | "column" : 23, |
| 741 | "source_fragment" : "port) { ..." |
| 742 | } |
| 743 | } |
| 744 | ] |
| 745 | }, |
| 746 | { |
| 747 | "name" : "wcmp_group", |
| 748 | "id" : 6, |
| 749 | "runtime_data" : [ |
| 750 | { |
| 751 | "name" : "groupId", |
| 752 | "bitwidth" : 16 |
| 753 | } |
| 754 | ], |
| 755 | "primitives" : [ |
| 756 | { |
| 757 | "op" : "assign", |
| 758 | "parameters" : [ |
| 759 | { |
| 760 | "type" : "field", |
| 761 | "value" : ["wcmp_meta", "groupId"] |
| 762 | }, |
| 763 | { |
| 764 | "type" : "runtime_data", |
| 765 | "value" : 0 |
| 766 | } |
| 767 | ], |
| 768 | "source_info" : { |
| 769 | "filename" : "wcmp.p4", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 770 | "line" : 38, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 771 | "column" : 18, |
| 772 | "source_fragment" : "groupId) { ..." |
| 773 | } |
| 774 | }, |
| 775 | { |
| 776 | "op" : "modify_field_with_hash_based_offset", |
| 777 | "parameters" : [ |
| 778 | { |
| 779 | "type" : "field", |
| 780 | "value" : ["wcmp_meta", "numBits"] |
| 781 | }, |
| 782 | { |
| 783 | "type" : "hexstr", |
| 784 | "value" : "0x00000002" |
| 785 | }, |
| 786 | { |
| 787 | "type" : "calculation", |
| 788 | "value" : "calc" |
| 789 | }, |
| 790 | { |
| 791 | "type" : "hexstr", |
| 792 | "value" : "0x000000000000001e" |
| 793 | } |
| 794 | ], |
| 795 | "source_info" : { |
| 796 | "filename" : "wcmp.p4", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 797 | "line" : 40, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 798 | "column" : 4, |
| 799 | "source_fragment" : "modify_field_with_hash_based_offset(wcmp_meta.numBits, 2, wcmp_hash, (32 - 2))" |
| 800 | } |
| 801 | } |
| 802 | ] |
| 803 | }, |
| 804 | { |
| 805 | "name" : "send_to_cpu", |
| 806 | "id" : 7, |
| 807 | "runtime_data" : [], |
| 808 | "primitives" : [ |
| 809 | { |
| 810 | "op" : "assign", |
| 811 | "parameters" : [ |
| 812 | { |
| 813 | "type" : "field", |
| 814 | "value" : ["standard_metadata", "egress_spec"] |
| 815 | }, |
| 816 | { |
| 817 | "type" : "hexstr", |
| 818 | "value" : "0x00ff" |
| 819 | } |
| 820 | ], |
| 821 | "source_info" : { |
| 822 | "filename" : "include/actions.p4", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 823 | "line" : 21, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 824 | "column" : 4, |
| 825 | "source_fragment" : "modify_field(standard_metadata.egress_spec, 255)" |
| 826 | } |
| 827 | } |
| 828 | ] |
| 829 | }, |
| 830 | { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 831 | "name" : "_drop", |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 832 | "id" : 8, |
| 833 | "runtime_data" : [], |
| 834 | "primitives" : [ |
| 835 | { |
| 836 | "op" : "assign", |
| 837 | "parameters" : [ |
| 838 | { |
| 839 | "type" : "field", |
| 840 | "value" : ["standard_metadata", "egress_spec"] |
| 841 | }, |
| 842 | { |
| 843 | "type" : "hexstr", |
| 844 | "value" : "0x01ff" |
| 845 | } |
| 846 | ], |
| 847 | "source_info" : { |
| 848 | "filename" : "include/actions.p4", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 849 | "line" : 13, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 850 | "column" : 4, |
| 851 | "source_fragment" : "modify_field(standard_metadata.egress_spec, 511)" |
| 852 | } |
| 853 | } |
| 854 | ] |
| 855 | }, |
| 856 | { |
| 857 | "name" : "set_egress_port", |
| 858 | "id" : 9, |
| 859 | "runtime_data" : [ |
| 860 | { |
| 861 | "name" : "port", |
| 862 | "bitwidth" : 9 |
| 863 | } |
| 864 | ], |
| 865 | "primitives" : [ |
| 866 | { |
| 867 | "op" : "assign", |
| 868 | "parameters" : [ |
| 869 | { |
| 870 | "type" : "field", |
| 871 | "value" : ["standard_metadata", "egress_spec"] |
| 872 | }, |
| 873 | { |
| 874 | "type" : "runtime_data", |
| 875 | "value" : 0 |
| 876 | } |
| 877 | ], |
| 878 | "source_info" : { |
| 879 | "filename" : "include/actions.p4", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 880 | "line" : 5, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 881 | "column" : 23, |
| 882 | "source_fragment" : "port) { ..." |
| 883 | } |
| 884 | } |
| 885 | ] |
| 886 | }, |
| 887 | { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 888 | "name" : "_packet_out", |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 889 | "id" : 10, |
| 890 | "runtime_data" : [], |
| 891 | "primitives" : [ |
| 892 | { |
| 893 | "op" : "assign", |
| 894 | "parameters" : [ |
| 895 | { |
| 896 | "type" : "field", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 897 | "value" : ["standard_metadata", "egress_spec"] |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 898 | }, |
| 899 | { |
| 900 | "type" : "field", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 901 | "value" : ["packet_out_hdr", "egress_port"] |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 902 | } |
| 903 | ], |
| 904 | "source_info" : { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 905 | "filename" : "include/packet_io.p4", |
| 906 | "line" : 7, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 907 | "column" : 4, |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 908 | "source_fragment" : "modify_field(standard_metadata.egress_spec, packet_out_hdr.egress_port)" |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 909 | } |
| 910 | }, |
| 911 | { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 912 | "op" : "remove_header", |
| 913 | "parameters" : [ |
| 914 | { |
| 915 | "type" : "header", |
| 916 | "value" : "packet_out_hdr" |
| 917 | } |
| 918 | ], |
| 919 | "source_info" : { |
| 920 | "filename" : "include/packet_io.p4", |
| 921 | "line" : 8, |
| 922 | "column" : 4, |
| 923 | "source_fragment" : "remove_header(packet_out_hdr)" |
| 924 | } |
| 925 | } |
| 926 | ] |
| 927 | }, |
| 928 | { |
| 929 | "name" : "count_egress", |
| 930 | "id" : 11, |
| 931 | "runtime_data" : [], |
| 932 | "primitives" : [ |
| 933 | { |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 934 | "op" : "assign", |
| 935 | "parameters" : [ |
| 936 | { |
| 937 | "type" : "field", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 938 | "value" : ["scalars", "tmp_1"] |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 939 | }, |
| 940 | { |
| 941 | "type" : "expression", |
| 942 | "value" : { |
| 943 | "type" : "expression", |
| 944 | "value" : { |
| 945 | "op" : "&", |
| 946 | "left" : { |
| 947 | "type" : "field", |
| 948 | "value" : ["standard_metadata", "egress_spec"] |
| 949 | }, |
| 950 | "right" : { |
| 951 | "type" : "hexstr", |
| 952 | "value" : "0xffffffff" |
| 953 | } |
| 954 | } |
| 955 | } |
| 956 | } |
| 957 | ] |
| 958 | }, |
| 959 | { |
| 960 | "op" : "count", |
| 961 | "parameters" : [ |
| 962 | { |
| 963 | "type" : "counter_array", |
| 964 | "value" : "egress_port_counter" |
| 965 | }, |
| 966 | { |
| 967 | "type" : "field", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 968 | "value" : ["scalars", "tmp_1"] |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 969 | } |
| 970 | ], |
| 971 | "source_info" : { |
| 972 | "filename" : "include/port_counters.p4", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 973 | "line" : 22, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 974 | "column" : 4, |
| 975 | "source_fragment" : "count(egress_port_counter, standard_metadata.egress_spec)" |
| 976 | } |
| 977 | } |
| 978 | ] |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 979 | }, |
| 980 | { |
| 981 | "name" : "count_ingress", |
| 982 | "id" : 12, |
| 983 | "runtime_data" : [], |
| 984 | "primitives" : [ |
| 985 | { |
| 986 | "op" : "assign", |
| 987 | "parameters" : [ |
| 988 | { |
| 989 | "type" : "field", |
| 990 | "value" : ["scalars", "tmp_2"] |
| 991 | }, |
| 992 | { |
| 993 | "type" : "expression", |
| 994 | "value" : { |
| 995 | "type" : "expression", |
| 996 | "value" : { |
| 997 | "op" : "&", |
| 998 | "left" : { |
| 999 | "type" : "field", |
| 1000 | "value" : ["standard_metadata", "ingress_port"] |
| 1001 | }, |
| 1002 | "right" : { |
| 1003 | "type" : "hexstr", |
| 1004 | "value" : "0xffffffff" |
| 1005 | } |
| 1006 | } |
| 1007 | } |
| 1008 | } |
| 1009 | ] |
| 1010 | }, |
| 1011 | { |
| 1012 | "op" : "count", |
| 1013 | "parameters" : [ |
| 1014 | { |
| 1015 | "type" : "counter_array", |
| 1016 | "value" : "ingress_port_counter" |
| 1017 | }, |
| 1018 | { |
| 1019 | "type" : "field", |
| 1020 | "value" : ["scalars", "tmp_2"] |
| 1021 | } |
| 1022 | ], |
| 1023 | "source_info" : { |
| 1024 | "filename" : "include/port_counters.p4", |
| 1025 | "line" : 18, |
| 1026 | "column" : 4, |
| 1027 | "source_fragment" : "count(ingress_port_counter, standard_metadata.ingress_port)" |
| 1028 | } |
| 1029 | } |
| 1030 | ] |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1031 | } |
| 1032 | ], |
| 1033 | "pipelines" : [ |
| 1034 | { |
| 1035 | "name" : "ingress", |
| 1036 | "id" : 0, |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1037 | "init_table" : "node_2", |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1038 | "tables" : [ |
| 1039 | { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1040 | "name" : "ingress_pkt", |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1041 | "id" : 0, |
| 1042 | "source_info" : { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1043 | "filename" : "include/packet_io.p4", |
| 1044 | "line" : 11, |
| 1045 | "column" : 0, |
| 1046 | "source_fragment" : "table ingress_pkt { ..." |
| 1047 | }, |
| 1048 | "key" : [], |
| 1049 | "match_type" : "exact", |
| 1050 | "type" : "simple", |
| 1051 | "max_size" : 1024, |
| 1052 | "with_counters" : false, |
| 1053 | "support_timeout" : false, |
| 1054 | "direct_meters" : null, |
| 1055 | "action_ids" : [10], |
| 1056 | "actions" : ["_packet_out"], |
| 1057 | "base_default_next" : "node_4", |
| 1058 | "next_tables" : { |
| 1059 | "_packet_out" : "node_4" |
| 1060 | }, |
| 1061 | "default_entry" : { |
| 1062 | "action_id" : 10, |
| 1063 | "action_const" : false, |
| 1064 | "action_data" : [], |
| 1065 | "action_entry_const" : false |
| 1066 | } |
| 1067 | }, |
| 1068 | { |
| 1069 | "name" : "table0", |
| 1070 | "id" : 1, |
| 1071 | "source_info" : { |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1072 | "filename" : "wcmp.p4", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1073 | "line" : 48, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1074 | "column" : 0, |
| 1075 | "source_fragment" : "table table0 { ..." |
| 1076 | }, |
| 1077 | "key" : [ |
| 1078 | { |
| 1079 | "match_type" : "ternary", |
| 1080 | "target" : ["standard_metadata", "ingress_port"], |
| 1081 | "mask" : null |
| 1082 | }, |
| 1083 | { |
| 1084 | "match_type" : "ternary", |
| 1085 | "target" : ["ethernet", "dstAddr"], |
| 1086 | "mask" : null |
| 1087 | }, |
| 1088 | { |
| 1089 | "match_type" : "ternary", |
| 1090 | "target" : ["ethernet", "srcAddr"], |
| 1091 | "mask" : null |
| 1092 | }, |
| 1093 | { |
| 1094 | "match_type" : "ternary", |
| 1095 | "target" : ["ethernet", "etherType"], |
| 1096 | "mask" : null |
| 1097 | } |
| 1098 | ], |
| 1099 | "match_type" : "ternary", |
| 1100 | "type" : "simple", |
| 1101 | "max_size" : 1024, |
| 1102 | "with_counters" : true, |
| 1103 | "support_timeout" : false, |
| 1104 | "direct_meters" : null, |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1105 | "action_ids" : [5, 6, 7, 8, 1], |
| 1106 | "actions" : ["set_egress_port", "wcmp_group", "send_to_cpu", "_drop", "NoAction"], |
| 1107 | "base_default_next" : "node_8", |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1108 | "next_tables" : { |
| 1109 | "wcmp_group" : "wcmp_set_selector_table", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1110 | "set_egress_port" : "node_8", |
| 1111 | "send_to_cpu" : "node_8", |
| 1112 | "_drop" : "node_8", |
| 1113 | "NoAction" : "node_8" |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1114 | }, |
| 1115 | "default_entry" : { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1116 | "action_id" : 1, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1117 | "action_const" : false, |
| 1118 | "action_data" : [], |
| 1119 | "action_entry_const" : false |
| 1120 | } |
| 1121 | }, |
| 1122 | { |
| 1123 | "name" : "wcmp_set_selector_table", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1124 | "id" : 2, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1125 | "source_info" : { |
| 1126 | "filename" : "wcmp.p4", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1127 | "line" : 64, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1128 | "column" : 0, |
| 1129 | "source_fragment" : "table wcmp_set_selector_table { ..." |
| 1130 | }, |
| 1131 | "key" : [], |
| 1132 | "match_type" : "exact", |
| 1133 | "type" : "simple", |
| 1134 | "max_size" : 1024, |
| 1135 | "with_counters" : false, |
| 1136 | "support_timeout" : false, |
| 1137 | "direct_meters" : null, |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1138 | "action_ids" : [4, 3], |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1139 | "actions" : ["wcmp_set_selector", "NoAction"], |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1140 | "base_default_next" : "node_8", |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1141 | "next_tables" : { |
| 1142 | "wcmp_set_selector" : "wcmp_group_table", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1143 | "NoAction" : "node_8" |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1144 | }, |
| 1145 | "default_entry" : { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1146 | "action_id" : 3, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1147 | "action_const" : false, |
| 1148 | "action_data" : [], |
| 1149 | "action_entry_const" : false |
| 1150 | } |
| 1151 | }, |
| 1152 | { |
| 1153 | "name" : "wcmp_group_table", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1154 | "id" : 3, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1155 | "source_info" : { |
| 1156 | "filename" : "wcmp.p4", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1157 | "line" : 70, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1158 | "column" : 0, |
| 1159 | "source_fragment" : "table wcmp_group_table { ..." |
| 1160 | }, |
| 1161 | "key" : [ |
| 1162 | { |
| 1163 | "match_type" : "exact", |
| 1164 | "target" : ["wcmp_meta", "groupId"], |
| 1165 | "mask" : null |
| 1166 | }, |
| 1167 | { |
| 1168 | "match_type" : "lpm", |
| 1169 | "target" : ["wcmp_meta", "selector"], |
| 1170 | "mask" : null |
| 1171 | } |
| 1172 | ], |
| 1173 | "match_type" : "lpm", |
| 1174 | "type" : "simple", |
| 1175 | "max_size" : 1024, |
| 1176 | "with_counters" : true, |
| 1177 | "support_timeout" : false, |
| 1178 | "direct_meters" : null, |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1179 | "action_ids" : [9, 2], |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1180 | "actions" : ["set_egress_port", "NoAction"], |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1181 | "base_default_next" : "node_8", |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1182 | "next_tables" : { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1183 | "set_egress_port" : "node_8", |
| 1184 | "NoAction" : "node_8" |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1185 | }, |
| 1186 | "default_entry" : { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1187 | "action_id" : 2, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1188 | "action_const" : false, |
| 1189 | "action_data" : [], |
| 1190 | "action_entry_const" : false |
| 1191 | } |
| 1192 | }, |
| 1193 | { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1194 | "name" : "ingress_port_count_table", |
| 1195 | "id" : 4, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1196 | "source_info" : { |
| 1197 | "filename" : "include/port_counters.p4", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1198 | "line" : 25, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1199 | "column" : 0, |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1200 | "source_fragment" : "table ingress_port_count_table { ..." |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1201 | }, |
| 1202 | "key" : [], |
| 1203 | "match_type" : "exact", |
| 1204 | "type" : "simple", |
| 1205 | "max_size" : 1024, |
| 1206 | "with_counters" : false, |
| 1207 | "support_timeout" : false, |
| 1208 | "direct_meters" : null, |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1209 | "action_ids" : [12], |
| 1210 | "actions" : ["count_ingress"], |
| 1211 | "base_default_next" : "egress_port_count_table", |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1212 | "next_tables" : { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1213 | "count_ingress" : "egress_port_count_table" |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1214 | }, |
| 1215 | "default_entry" : { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1216 | "action_id" : 12, |
| 1217 | "action_const" : false, |
| 1218 | "action_data" : [], |
| 1219 | "action_entry_const" : false |
| 1220 | } |
| 1221 | }, |
| 1222 | { |
| 1223 | "name" : "egress_port_count_table", |
| 1224 | "id" : 5, |
| 1225 | "source_info" : { |
| 1226 | "filename" : "include/port_counters.p4", |
| 1227 | "line" : 30, |
| 1228 | "column" : 0, |
| 1229 | "source_fragment" : "table egress_port_count_table { ..." |
| 1230 | }, |
| 1231 | "key" : [], |
| 1232 | "match_type" : "exact", |
| 1233 | "type" : "simple", |
| 1234 | "max_size" : 1024, |
| 1235 | "with_counters" : false, |
| 1236 | "support_timeout" : false, |
| 1237 | "direct_meters" : null, |
| 1238 | "action_ids" : [11], |
| 1239 | "actions" : ["count_egress"], |
| 1240 | "base_default_next" : null, |
| 1241 | "next_tables" : { |
| 1242 | "count_egress" : null |
| 1243 | }, |
| 1244 | "default_entry" : { |
| 1245 | "action_id" : 11, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1246 | "action_const" : false, |
| 1247 | "action_data" : [], |
| 1248 | "action_entry_const" : false |
| 1249 | } |
| 1250 | } |
| 1251 | ], |
| 1252 | "action_profiles" : [], |
| 1253 | "conditionals" : [ |
| 1254 | { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1255 | "name" : "node_2", |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1256 | "id" : 0, |
| 1257 | "source_info" : { |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1258 | "filename" : "include/packet_io.p4", |
| 1259 | "line" : 19, |
| 1260 | "column" : 8, |
| 1261 | "source_fragment" : "valid(packet_out_hdr)" |
| 1262 | }, |
| 1263 | "expression" : { |
| 1264 | "type" : "expression", |
| 1265 | "value" : { |
| 1266 | "op" : "==", |
| 1267 | "left" : { |
| 1268 | "type" : "field", |
| 1269 | "value" : ["packet_out_hdr", "$valid$"] |
| 1270 | }, |
| 1271 | "right" : { |
| 1272 | "type" : "hexstr", |
| 1273 | "value" : "0x01" |
| 1274 | } |
| 1275 | } |
| 1276 | }, |
| 1277 | "true_next" : "ingress_pkt", |
| 1278 | "false_next" : "node_4" |
| 1279 | }, |
| 1280 | { |
| 1281 | "name" : "node_4", |
| 1282 | "id" : 1, |
| 1283 | "source_info" : { |
| 1284 | "filename" : "wcmp.p4", |
| 1285 | "line" : 94, |
| 1286 | "column" : 12, |
| 1287 | "source_fragment" : "valid(packet_out_hdr)" |
| 1288 | }, |
| 1289 | "expression" : { |
| 1290 | "type" : "expression", |
| 1291 | "value" : { |
| 1292 | "op" : "!=", |
| 1293 | "left" : { |
| 1294 | "type" : "field", |
| 1295 | "value" : ["packet_out_hdr", "$valid$"] |
| 1296 | }, |
| 1297 | "right" : { |
| 1298 | "type" : "hexstr", |
| 1299 | "value" : "0x01" |
| 1300 | } |
| 1301 | } |
| 1302 | }, |
| 1303 | "true_next" : "table0", |
| 1304 | "false_next" : "node_8" |
| 1305 | }, |
| 1306 | { |
| 1307 | "name" : "node_8", |
| 1308 | "id" : 2, |
| 1309 | "source_info" : { |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1310 | "filename" : "include/port_counters.p4", |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1311 | "line" : 36, |
| 1312 | "column" : 38, |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1313 | "source_fragment" : "<" |
| 1314 | }, |
| 1315 | "expression" : { |
| 1316 | "type" : "expression", |
| 1317 | "value" : { |
| 1318 | "op" : "<", |
| 1319 | "left" : { |
| 1320 | "type" : "field", |
| 1321 | "value" : ["standard_metadata", "egress_spec"] |
| 1322 | }, |
| 1323 | "right" : { |
| 1324 | "type" : "hexstr", |
| 1325 | "value" : "0x00fe" |
| 1326 | } |
| 1327 | } |
| 1328 | }, |
| 1329 | "false_next" : null, |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1330 | "true_next" : "ingress_port_count_table" |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1331 | } |
| 1332 | ] |
| 1333 | }, |
| 1334 | { |
| 1335 | "name" : "egress", |
| 1336 | "id" : 1, |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1337 | "init_table" : "node_13", |
| 1338 | "tables" : [ |
| 1339 | { |
| 1340 | "name" : "egress_pkt", |
| 1341 | "id" : 6, |
| 1342 | "source_info" : { |
| 1343 | "filename" : "include/packet_io.p4", |
| 1344 | "line" : 29, |
| 1345 | "column" : 0, |
| 1346 | "source_fragment" : "table egress_pkt { ..." |
| 1347 | }, |
| 1348 | "key" : [], |
| 1349 | "match_type" : "exact", |
| 1350 | "type" : "simple", |
| 1351 | "max_size" : 1024, |
| 1352 | "with_counters" : false, |
| 1353 | "support_timeout" : false, |
| 1354 | "direct_meters" : null, |
| 1355 | "action_ids" : [0], |
| 1356 | "actions" : ["add_packet_in_hdr"], |
| 1357 | "base_default_next" : null, |
| 1358 | "next_tables" : { |
| 1359 | "add_packet_in_hdr" : null |
| 1360 | }, |
| 1361 | "default_entry" : { |
| 1362 | "action_id" : 0, |
| 1363 | "action_const" : false, |
| 1364 | "action_data" : [], |
| 1365 | "action_entry_const" : false |
| 1366 | } |
| 1367 | } |
| 1368 | ], |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1369 | "action_profiles" : [], |
Carmelo Cascone | 16de6db | 2017-08-22 00:27:57 +0200 | [diff] [blame] | 1370 | "conditionals" : [ |
| 1371 | { |
| 1372 | "name" : "node_13", |
| 1373 | "id" : 3, |
| 1374 | "source_info" : { |
| 1375 | "filename" : "include/packet_io.p4", |
| 1376 | "line" : 40, |
| 1377 | "column" : 39, |
| 1378 | "source_fragment" : "==" |
| 1379 | }, |
| 1380 | "expression" : { |
| 1381 | "type" : "expression", |
| 1382 | "value" : { |
| 1383 | "op" : "==", |
| 1384 | "left" : { |
| 1385 | "type" : "field", |
| 1386 | "value" : ["standard_metadata", "ingress_port"] |
| 1387 | }, |
| 1388 | "right" : { |
| 1389 | "type" : "hexstr", |
| 1390 | "value" : "0x00ff" |
| 1391 | } |
| 1392 | } |
| 1393 | }, |
| 1394 | "false_next" : null, |
| 1395 | "true_next" : "egress_pkt" |
| 1396 | } |
| 1397 | ] |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 1398 | } |
| 1399 | ], |
| 1400 | "checksums" : [], |
| 1401 | "force_arith" : [], |
| 1402 | "extern_instances" : [], |
| 1403 | "field_aliases" : [ |
| 1404 | [ |
| 1405 | "queueing_metadata.enq_timestamp", |
| 1406 | ["standard_metadata", "enq_timestamp"] |
| 1407 | ], |
| 1408 | [ |
| 1409 | "queueing_metadata.enq_qdepth", |
| 1410 | ["standard_metadata", "enq_qdepth"] |
| 1411 | ], |
| 1412 | [ |
| 1413 | "queueing_metadata.deq_timedelta", |
| 1414 | ["standard_metadata", "deq_timedelta"] |
| 1415 | ], |
| 1416 | [ |
| 1417 | "queueing_metadata.deq_qdepth", |
| 1418 | ["standard_metadata", "deq_qdepth"] |
| 1419 | ], |
| 1420 | [ |
| 1421 | "intrinsic_metadata.ingress_global_timestamp", |
| 1422 | ["standard_metadata", "ingress_global_timestamp"] |
| 1423 | ], |
| 1424 | [ |
| 1425 | "intrinsic_metadata.lf_field_list", |
| 1426 | ["standard_metadata", "lf_field_list"] |
| 1427 | ], |
| 1428 | [ |
| 1429 | "intrinsic_metadata.mcast_grp", |
| 1430 | ["standard_metadata", "mcast_grp"] |
| 1431 | ], |
| 1432 | [ |
| 1433 | "intrinsic_metadata.resubmit_flag", |
| 1434 | ["standard_metadata", "resubmit_flag"] |
| 1435 | ], |
| 1436 | [ |
| 1437 | "intrinsic_metadata.egress_rid", |
| 1438 | ["standard_metadata", "egress_rid"] |
| 1439 | ] |
| 1440 | ] |
| 1441 | } |