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