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