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