Do not compile with IPv6 support in fabric.p4 by default
Change-Id: I5194ccb0ab78ec4388106cea14c96884f5d16b0f
diff --git a/pipelines/fabric/src/main/resources/include/control/forwarding.p4 b/pipelines/fabric/src/main/resources/include/control/forwarding.p4
index 2993191..de46115 100644
--- a/pipelines/fabric/src/main/resources/include/control/forwarding.p4
+++ b/pipelines/fabric/src/main/resources/include/control/forwarding.p4
@@ -31,8 +31,6 @@
direct_counter(CounterType.packets_and_bytes) mpls_counter;
direct_counter(CounterType.packets_and_bytes) unicast_v4_counter;
direct_counter(CounterType.packets_and_bytes) multicast_v4_counter;
- direct_counter(CounterType.packets_and_bytes) unicast_v6_counter;
- direct_counter(CounterType.packets_and_bytes) multicast_v6_counter;
direct_counter(CounterType.packets_and_bytes) acl_counter;
action drop() {
@@ -98,6 +96,10 @@
counters = multicast_v4_counter;
}
+#ifdef WITH_IPV6
+ direct_counter(CounterType.packets_and_bytes) unicast_v6_counter;
+ direct_counter(CounterType.packets_and_bytes) multicast_v6_counter;
+
table unicast_v6 {
key = {
hdr.ipv6.dst_addr: lpm;
@@ -120,6 +122,7 @@
}
counters = multicast_v6_counter;
}
+#endif // WITH_IPV6
table acl {
key = {
@@ -161,8 +164,10 @@
}
else if (fabric_metadata.fwd_type == FWD_IPV4_UNICAST) unicast_v4.apply();
else if (fabric_metadata.fwd_type == FWD_IPV4_MULTICAST) multicast_v4.apply();
+#ifdef WITH_IPV6
else if (fabric_metadata.fwd_type == FWD_IPV6_UNICAST) unicast_v6.apply();
else if (fabric_metadata.fwd_type == FWD_IPV6_MULTICAST) multicast_v6.apply();
+#endif // WITH_IPV6
acl.apply();
}
}
diff --git a/pipelines/fabric/src/main/resources/include/control/next.p4 b/pipelines/fabric/src/main/resources/include/control/next.p4
index 2fbb866..e0ebbe8 100644
--- a/pipelines/fabric/src/main/resources/include/control/next.p4
+++ b/pipelines/fabric/src/main/resources/include/control/next.p4
@@ -139,9 +139,11 @@
if(hdr.ipv4.isValid()) {
hdr.ipv4.ttl = hdr.ipv4.ttl - 1;
}
+#ifdef WITH_IPV6
else if (hdr.ipv6.isValid()) {
hdr.ipv6.hop_limit = hdr.ipv6.hop_limit - 1;
}
+#endif // WITH_IPV6
}
}
hashed.apply();
diff --git a/pipelines/fabric/src/main/resources/include/parser.p4 b/pipelines/fabric/src/main/resources/include/parser.p4
index 8355c12..2b50505 100644
--- a/pipelines/fabric/src/main/resources/include/parser.p4
+++ b/pipelines/fabric/src/main/resources/include/parser.p4
@@ -45,7 +45,9 @@
ETHERTYPE_MPLS: parse_mpls;
ETHERTYPE_ARP: parse_arp;
ETHERTYPE_IPV4: parse_ipv4;
+#ifdef WITH_IPV6
ETHERTYPE_IPV6: parse_ipv6;
+#endif // WITH_IPV6
default: accept;
}
}
@@ -55,7 +57,9 @@
transition select(hdr.vlan_tag.ether_type){
ETHERTYPE_ARP: parse_arp;
ETHERTYPE_IPV4: parse_ipv4;
+#ifdef WITH_IPV6
ETHERTYPE_IPV6: parse_ipv6;
+#endif // WITH_IPV6
ETHERTYPE_MPLS: parse_mpls;
default: accept;
}
@@ -69,7 +73,9 @@
transition select(packet.lookahead<bit<4>>()) {
//The packet should be either IPv4 or IPv6.
IP_VERSION_4: parse_ipv4;
+#ifdef WITH_IPV6
IP_VERSION_6: parse_ipv6;
+#endif // WITH_IPV6
default: parse_ethernet;
}
}
@@ -86,6 +92,7 @@
}
}
+#ifdef WITH_IPV6
state parse_ipv6 {
packet.extract(hdr.ipv6);
fabric_metadata.ip_proto = hdr.ipv6.next_hdr;
@@ -96,6 +103,7 @@
default: accept;
}
}
+#endif // WITH_IPV6
state parse_arp {
packet.extract(hdr.arp);
@@ -168,7 +176,9 @@
packet.emit(hdr.gtpu);
#endif // WITH_SPGW
packet.emit(hdr.ipv4);
+#ifdef WITH_IPV6
packet.emit(hdr.ipv6);
+#endif // WITH_IPV6
packet.emit(hdr.tcp);
packet.emit(hdr.udp);
packet.emit(hdr.icmp);
diff --git a/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric.json b/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric.json
index d6f4899..cdaefbc 100644
--- a/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric.json
+++ b/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric.json
@@ -384,11 +384,6 @@
"next_state" : "parse_ipv4"
},
{
- "value" : "0x86dd",
- "mask" : null,
- "next_state" : "parse_ipv6"
- },
- {
"value" : "default",
"mask" : null,
"next_state" : null
@@ -427,11 +422,6 @@
"next_state" : "parse_ipv4"
},
{
- "value" : "0x86dd",
- "mask" : null,
- "next_state" : "parse_ipv6"
- },
- {
"value" : "0x8847",
"mask" : null,
"next_state" : "parse_mpls"
@@ -483,11 +473,6 @@
"next_state" : "parse_ipv4"
},
{
- "value" : "0x06",
- "mask" : null,
- "next_state" : "parse_ipv6"
- },
- {
"value" : "default",
"mask" : null,
"next_state" : "parse_ethernet"
@@ -557,64 +542,8 @@
]
},
{
- "name" : "parse_ipv6",
- "id" : 6,
- "parser_ops" : [
- {
- "parameters" : [
- {
- "type" : "regular",
- "value" : "ipv6"
- }
- ],
- "op" : "extract"
- },
- {
- "parameters" : [
- {
- "type" : "field",
- "value" : ["scalars", "fabric_metadata_t.ip_proto"]
- },
- {
- "type" : "field",
- "value" : ["ipv6", "next_hdr"]
- }
- ],
- "op" : "set"
- }
- ],
- "transitions" : [
- {
- "value" : "0x06",
- "mask" : null,
- "next_state" : "parse_tcp"
- },
- {
- "value" : "0x11",
- "mask" : null,
- "next_state" : "parse_udp"
- },
- {
- "value" : "0x3a",
- "mask" : null,
- "next_state" : "parse_icmp"
- },
- {
- "value" : "default",
- "mask" : null,
- "next_state" : null
- }
- ],
- "transition_key" : [
- {
- "type" : "field",
- "value" : ["ipv6", "next_hdr"]
- }
- ]
- },
- {
"name" : "parse_arp",
- "id" : 7,
+ "id" : 6,
"parser_ops" : [
{
"parameters" : [
@@ -637,7 +566,7 @@
},
{
"name" : "parse_tcp",
- "id" : 8,
+ "id" : 7,
"parser_ops" : [
{
"parameters" : [
@@ -686,7 +615,7 @@
},
{
"name" : "parse_udp",
- "id" : 9,
+ "id" : 8,
"parser_ops" : [
{
"parameters" : [
@@ -735,7 +664,7 @@
},
{
"name" : "parse_icmp",
- "id" : 10,
+ "id" : 9,
"parser_ops" : [
{
"parameters" : [
@@ -765,11 +694,11 @@
"id" : 0,
"source_info" : {
"filename" : "include/parser.p4",
- "line" : 158,
+ "line" : 166,
"column" : 8,
"source_fragment" : "FabricDeparser"
},
- "order" : ["packet_in", "ethernet", "vlan_tag", "mpls", "arp", "ipv4", "ipv6", "tcp", "udp", "icmp"]
+ "order" : ["packet_in", "ethernet", "vlan_tag", "mpls", "arp", "ipv4", "tcp", "udp", "icmp"]
}
],
"meter_arrays" : [],
@@ -811,44 +740,32 @@
"binding" : "forwarding.multicast_v4"
},
{
- "name" : "forwarding.unicast_v6_counter",
- "id" : 6,
- "is_direct" : true,
- "binding" : "forwarding.unicast_v6"
- },
- {
- "name" : "forwarding.multicast_v6_counter",
- "id" : 7,
- "is_direct" : true,
- "binding" : "forwarding.multicast_v6"
- },
- {
"name" : "forwarding.acl_counter",
- "id" : 8,
+ "id" : 6,
"is_direct" : true,
"binding" : "forwarding.acl"
},
{
"name" : "next.simple_counter",
- "id" : 9,
+ "id" : 7,
"is_direct" : true,
"binding" : "next.simple"
},
{
"name" : "next.hashed_counter",
- "id" : 10,
+ "id" : 8,
"is_direct" : true,
"binding" : "next.hashed"
},
{
"name" : "next.broadcast_counter",
- "id" : 11,
+ "id" : 9,
"is_direct" : true,
"binding" : "next.broadcast"
},
{
"name" : "port_counters_control.egress_port_counter",
- "id" : 12,
+ "id" : 10,
"source_info" : {
"filename" : "include/control/port_counter.p4",
"line" : 23,
@@ -860,7 +777,7 @@
},
{
"name" : "port_counters_control.ingress_port_counter",
- "id" : 13,
+ "id" : 11,
"source_info" : {
"filename" : "include/control/port_counter.p4",
"line" : 24,
@@ -878,7 +795,7 @@
"id" : 0,
"source_info" : {
"filename" : "include/checksum.p4",
- "line" : 55,
+ "line" : 56,
"column" : 8,
"source_fragment" : "verify_checksum(hdr.ipv4.isValid(), ..."
},
@@ -1045,20 +962,8 @@
"primitives" : []
},
{
- "name" : "NoAction",
- "id" : 9,
- "runtime_data" : [],
- "primitives" : []
- },
- {
- "name" : "NoAction",
- "id" : 10,
- "runtime_data" : [],
- "primitives" : []
- },
- {
"name" : "filtering.drop",
- "id" : 11,
+ "id" : 9,
"runtime_data" : [],
"primitives" : [
{
@@ -1075,7 +980,7 @@
},
{
"name" : "filtering.set_vlan",
- "id" : 12,
+ "id" : 10,
"runtime_data" : [
{
"name" : "new_vlan_id",
@@ -1106,7 +1011,7 @@
},
{
"name" : "filtering.push_internal_vlan",
- "id" : 13,
+ "id" : 11,
"runtime_data" : [
{
"name" : "new_vlan_id",
@@ -1257,7 +1162,7 @@
},
{
"name" : "filtering.set_forwarding_type",
- "id" : 14,
+ "id" : 12,
"runtime_data" : [
{
"name" : "fwd_type",
@@ -1288,7 +1193,7 @@
},
{
"name" : "forwarding.drop",
- "id" : 15,
+ "id" : 13,
"runtime_data" : [],
"primitives" : [
{
@@ -1296,7 +1201,7 @@
"parameters" : [],
"source_info" : {
"filename" : "include/control/forwarding.p4",
- "line" : 39,
+ "line" : 37,
"column" : 8,
"source_fragment" : "mark_to_drop()"
}
@@ -1305,6 +1210,68 @@
},
{
"name" : "forwarding.set_next_id",
+ "id" : 14,
+ "runtime_data" : [
+ {
+ "name" : "next_id",
+ "bitwidth" : 32
+ }
+ ],
+ "primitives" : [
+ {
+ "op" : "assign",
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "fabric_metadata_t.next_id"]
+ },
+ {
+ "type" : "runtime_data",
+ "value" : 0
+ }
+ ],
+ "source_info" : {
+ "filename" : "include/control/forwarding.p4",
+ "line" : 41,
+ "column" : 8,
+ "source_fragment" : "fabric_metadata.next_id = next_id"
+ }
+ }
+ ]
+ },
+ {
+ "name" : "forwarding.set_next_id",
+ "id" : 15,
+ "runtime_data" : [
+ {
+ "name" : "next_id",
+ "bitwidth" : 32
+ }
+ ],
+ "primitives" : [
+ {
+ "op" : "assign",
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "fabric_metadata_t.next_id"]
+ },
+ {
+ "type" : "runtime_data",
+ "value" : 0
+ }
+ ],
+ "source_info" : {
+ "filename" : "include/control/forwarding.p4",
+ "line" : 41,
+ "column" : 8,
+ "source_fragment" : "fabric_metadata.next_id = next_id"
+ }
+ }
+ ]
+ },
+ {
+ "name" : "forwarding.set_next_id",
"id" : 16,
"runtime_data" : [
{
@@ -1327,7 +1294,7 @@
],
"source_info" : {
"filename" : "include/control/forwarding.p4",
- "line" : 43,
+ "line" : 41,
"column" : 8,
"source_fragment" : "fabric_metadata.next_id = next_id"
}
@@ -1358,131 +1325,7 @@
],
"source_info" : {
"filename" : "include/control/forwarding.p4",
- "line" : 43,
- "column" : 8,
- "source_fragment" : "fabric_metadata.next_id = next_id"
- }
- }
- ]
- },
- {
- "name" : "forwarding.set_next_id",
- "id" : 18,
- "runtime_data" : [
- {
- "name" : "next_id",
- "bitwidth" : 32
- }
- ],
- "primitives" : [
- {
- "op" : "assign",
- "parameters" : [
- {
- "type" : "field",
- "value" : ["scalars", "fabric_metadata_t.next_id"]
- },
- {
- "type" : "runtime_data",
- "value" : 0
- }
- ],
- "source_info" : {
- "filename" : "include/control/forwarding.p4",
- "line" : 43,
- "column" : 8,
- "source_fragment" : "fabric_metadata.next_id = next_id"
- }
- }
- ]
- },
- {
- "name" : "forwarding.set_next_id",
- "id" : 19,
- "runtime_data" : [
- {
- "name" : "next_id",
- "bitwidth" : 32
- }
- ],
- "primitives" : [
- {
- "op" : "assign",
- "parameters" : [
- {
- "type" : "field",
- "value" : ["scalars", "fabric_metadata_t.next_id"]
- },
- {
- "type" : "runtime_data",
- "value" : 0
- }
- ],
- "source_info" : {
- "filename" : "include/control/forwarding.p4",
- "line" : 43,
- "column" : 8,
- "source_fragment" : "fabric_metadata.next_id = next_id"
- }
- }
- ]
- },
- {
- "name" : "forwarding.set_next_id",
- "id" : 20,
- "runtime_data" : [
- {
- "name" : "next_id",
- "bitwidth" : 32
- }
- ],
- "primitives" : [
- {
- "op" : "assign",
- "parameters" : [
- {
- "type" : "field",
- "value" : ["scalars", "fabric_metadata_t.next_id"]
- },
- {
- "type" : "runtime_data",
- "value" : 0
- }
- ],
- "source_info" : {
- "filename" : "include/control/forwarding.p4",
- "line" : 43,
- "column" : 8,
- "source_fragment" : "fabric_metadata.next_id = next_id"
- }
- }
- ]
- },
- {
- "name" : "forwarding.set_next_id",
- "id" : 21,
- "runtime_data" : [
- {
- "name" : "next_id",
- "bitwidth" : 32
- }
- ],
- "primitives" : [
- {
- "op" : "assign",
- "parameters" : [
- {
- "type" : "field",
- "value" : ["scalars", "fabric_metadata_t.next_id"]
- },
- {
- "type" : "runtime_data",
- "value" : 0
- }
- ],
- "source_info" : {
- "filename" : "include/control/forwarding.p4",
- "line" : 43,
+ "line" : 41,
"column" : 8,
"source_fragment" : "fabric_metadata.next_id = next_id"
}
@@ -1491,7 +1334,7 @@
},
{
"name" : "forwarding.pop_mpls_and_next",
- "id" : 22,
+ "id" : 18,
"runtime_data" : [
{
"name" : "next_id",
@@ -1509,7 +1352,7 @@
],
"source_info" : {
"filename" : "include/control/forwarding.p4",
- "line" : 47,
+ "line" : 45,
"column" : 8,
"source_fragment" : "hdr.mpls.setInvalid()"
}
@@ -1528,7 +1371,7 @@
],
"source_info" : {
"filename" : "include/control/forwarding.p4",
- "line" : 48,
+ "line" : 46,
"column" : 8,
"source_fragment" : "fabric_metadata.next_id = next_id"
}
@@ -1537,7 +1380,7 @@
},
{
"name" : "forwarding.duplicate_to_controller",
- "id" : 23,
+ "id" : 19,
"runtime_data" : [],
"primitives" : [
{
@@ -1563,7 +1406,7 @@
},
{
"name" : "next.output",
- "id" : 24,
+ "id" : 20,
"runtime_data" : [
{
"name" : "port_num",
@@ -1594,7 +1437,7 @@
},
{
"name" : "next.set_vlan_output",
- "id" : 25,
+ "id" : 21,
"runtime_data" : [
{
"name" : "new_vlan_id",
@@ -1677,7 +1520,7 @@
},
{
"name" : "next.l3_routing",
- "id" : 26,
+ "id" : 22,
"runtime_data" : [
{
"name" : "port_num",
@@ -1754,7 +1597,7 @@
},
{
"name" : "next.l3_routing",
- "id" : 27,
+ "id" : 23,
"runtime_data" : [
{
"name" : "port_num",
@@ -1831,7 +1674,7 @@
},
{
"name" : "next.set_mcast_group",
- "id" : 28,
+ "id" : 24,
"runtime_data" : [
{
"name" : "gid",
@@ -1885,7 +1728,7 @@
},
{
"name" : "next.mpls_routing_v4",
- "id" : 29,
+ "id" : 25,
"runtime_data" : [
{
"name" : "port_num",
@@ -2076,7 +1919,7 @@
},
{
"name" : "next.mpls_routing_v4",
- "id" : 30,
+ "id" : 26,
"runtime_data" : [
{
"name" : "port_num",
@@ -2267,7 +2110,7 @@
},
{
"name" : "next.mpls_routing_v6",
- "id" : 31,
+ "id" : 27,
"runtime_data" : [
{
"name" : "port_num",
@@ -2458,7 +2301,7 @@
},
{
"name" : "act",
- "id" : 32,
+ "id" : 28,
"runtime_data" : [],
"primitives" : [
{
@@ -2499,7 +2342,7 @@
},
{
"name" : "act_0",
- "id" : 33,
+ "id" : 29,
"runtime_data" : [],
"primitives" : [
{
@@ -2544,7 +2387,7 @@
},
{
"name" : "act_1",
- "id" : 34,
+ "id" : 30,
"runtime_data" : [],
"primitives" : [
{
@@ -2574,7 +2417,7 @@
},
{
"name" : "act_2",
- "id" : 35,
+ "id" : 31,
"runtime_data" : [],
"primitives" : [
{
@@ -2604,7 +2447,7 @@
},
{
"name" : "act_3",
- "id" : 36,
+ "id" : 32,
"runtime_data" : [],
"primitives" : [
{
@@ -2653,56 +2496,7 @@
},
{
"name" : "act_4",
- "id" : 37,
- "runtime_data" : [],
- "primitives" : [
- {
- "op" : "assign",
- "parameters" : [
- {
- "type" : "field",
- "value" : ["ipv6", "hop_limit"]
- },
- {
- "type" : "expression",
- "value" : {
- "type" : "expression",
- "value" : {
- "op" : "&",
- "left" : {
- "type" : "expression",
- "value" : {
- "op" : "+",
- "left" : {
- "type" : "field",
- "value" : ["ipv6", "hop_limit"]
- },
- "right" : {
- "type" : "hexstr",
- "value" : "0xff"
- }
- }
- },
- "right" : {
- "type" : "hexstr",
- "value" : "0xff"
- }
- }
- }
- }
- ],
- "source_info" : {
- "filename" : "include/control/next.p4",
- "line" : 143,
- "column" : 20,
- "source_fragment" : "hdr.ipv6.hop_limit = hdr.ipv6.hop_limit - 1"
- }
- }
- ]
- },
- {
- "name" : "act_5",
- "id" : 38,
+ "id" : 33,
"runtime_data" : [],
"primitives" : [
{
@@ -2753,8 +2547,8 @@
]
},
{
- "name" : "act_6",
- "id" : 39,
+ "name" : "act_5",
+ "id" : 34,
"runtime_data" : [],
"primitives" : [
{
@@ -2805,8 +2599,8 @@
]
},
{
- "name" : "act_7",
- "id" : 40,
+ "name" : "act_6",
+ "id" : 35,
"runtime_data" : [],
"primitives" : [
{
@@ -2823,7 +2617,7 @@
],
"source_info" : {
"filename" : "include/control/next.p4",
- "line" : 160,
+ "line" : 162,
"column" : 12,
"source_fragment" : "hdr.ethernet.ether_type = hdr.vlan_tag.ether_type"
}
@@ -2838,7 +2632,7 @@
],
"source_info" : {
"filename" : "include/control/next.p4",
- "line" : 161,
+ "line" : 163,
"column" : 12,
"source_fragment" : "hdr.vlan_tag.setInvalid()"
}
@@ -2846,8 +2640,8 @@
]
},
{
- "name" : "act_8",
- "id" : 41,
+ "name" : "act_7",
+ "id" : 36,
"runtime_data" : [],
"primitives" : [
{
@@ -2909,14 +2703,14 @@
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
- "action_ids" : [32],
+ "action_ids" : [28],
"actions" : ["act"],
"base_default_next" : null,
"next_tables" : {
"act" : null
},
"default_entry" : {
- "action_id" : 32,
+ "action_id" : 28,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
@@ -2954,7 +2748,7 @@
"with_counters" : true,
"support_timeout" : false,
"direct_meters" : null,
- "action_ids" : [13, 12, 0, 11],
+ "action_ids" : [11, 10, 0, 9],
"actions" : ["filtering.push_internal_vlan", "filtering.set_vlan", "nop", "filtering.drop"],
"base_default_next" : "filtering.fwd_classifier",
"next_tables" : {
@@ -3002,14 +2796,14 @@
"with_counters" : true,
"support_timeout" : false,
"direct_meters" : null,
- "action_ids" : [14],
+ "action_ids" : [12],
"actions" : ["filtering.set_forwarding_type"],
"base_default_next" : "node_6",
"next_tables" : {
"filtering.set_forwarding_type" : "node_6"
},
"default_entry" : {
- "action_id" : 14,
+ "action_id" : 12,
"action_const" : true,
"action_data" : ["0x0"],
"action_entry_const" : true
@@ -3020,7 +2814,7 @@
"id" : 3,
"source_info" : {
"filename" : "include/control/forwarding.p4",
- "line" : 55,
+ "line" : 53,
"column" : 10,
"source_fragment" : "bridging"
},
@@ -3042,7 +2836,7 @@
"with_counters" : true,
"support_timeout" : false,
"direct_meters" : null,
- "action_ids" : [16, 2],
+ "action_ids" : [14, 2],
"actions" : ["forwarding.set_next_id", "NoAction"],
"base_default_next" : "forwarding.acl",
"next_tables" : {
@@ -3061,7 +2855,7 @@
"id" : 4,
"source_info" : {
"filename" : "include/control/forwarding.p4",
- "line" : 67,
+ "line" : 65,
"column" : 10,
"source_fragment" : "mpls"
},
@@ -3078,7 +2872,7 @@
"with_counters" : true,
"support_timeout" : false,
"direct_meters" : null,
- "action_ids" : [22, 3],
+ "action_ids" : [18, 3],
"actions" : ["forwarding.pop_mpls_and_next", "NoAction"],
"base_default_next" : "tbl_act_0",
"next_tables" : {
@@ -3102,14 +2896,14 @@
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
- "action_ids" : [33],
+ "action_ids" : [29],
"actions" : ["act_0"],
"base_default_next" : "forwarding.acl",
"next_tables" : {
"act_0" : "forwarding.acl"
},
"default_entry" : {
- "action_id" : 33,
+ "action_id" : 29,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
@@ -3120,7 +2914,7 @@
"id" : 6,
"source_info" : {
"filename" : "include/control/forwarding.p4",
- "line" : 78,
+ "line" : 76,
"column" : 10,
"source_fragment" : "unicast_v4"
},
@@ -3137,7 +2931,7 @@
"with_counters" : true,
"support_timeout" : false,
"direct_meters" : null,
- "action_ids" : [17, 4],
+ "action_ids" : [15, 4],
"actions" : ["forwarding.set_next_id", "NoAction"],
"base_default_next" : "forwarding.acl",
"next_tables" : {
@@ -3156,7 +2950,7 @@
"id" : 7,
"source_info" : {
"filename" : "include/control/forwarding.p4",
- "line" : 89,
+ "line" : 87,
"column" : 10,
"source_fragment" : "multicast_v4"
},
@@ -3178,7 +2972,7 @@
"with_counters" : true,
"support_timeout" : false,
"direct_meters" : null,
- "action_ids" : [18, 5],
+ "action_ids" : [16, 5],
"actions" : ["forwarding.set_next_id", "NoAction"],
"base_default_next" : "forwarding.acl",
"next_tables" : {
@@ -3193,88 +2987,11 @@
}
},
{
- "name" : "forwarding.unicast_v6",
+ "name" : "forwarding.acl",
"id" : 8,
"source_info" : {
"filename" : "include/control/forwarding.p4",
- "line" : 101,
- "column" : 10,
- "source_fragment" : "unicast_v6"
- },
- "key" : [
- {
- "match_type" : "lpm",
- "target" : ["ipv6", "dst_addr"],
- "mask" : null
- }
- ],
- "match_type" : "lpm",
- "type" : "simple",
- "max_size" : 1024,
- "with_counters" : true,
- "support_timeout" : false,
- "direct_meters" : null,
- "action_ids" : [19, 6],
- "actions" : ["forwarding.set_next_id", "NoAction"],
- "base_default_next" : "forwarding.acl",
- "next_tables" : {
- "forwarding.set_next_id" : "forwarding.acl",
- "NoAction" : "forwarding.acl"
- },
- "default_entry" : {
- "action_id" : 6,
- "action_const" : false,
- "action_data" : [],
- "action_entry_const" : false
- }
- },
- {
- "name" : "forwarding.multicast_v6",
- "id" : 9,
- "source_info" : {
- "filename" : "include/control/forwarding.p4",
- "line" : 112,
- "column" : 10,
- "source_fragment" : "multicast_v6"
- },
- "key" : [
- {
- "match_type" : "exact",
- "target" : ["vlan_tag", "vlan_id"],
- "mask" : null
- },
- {
- "match_type" : "lpm",
- "target" : ["ipv6", "dst_addr"],
- "mask" : null
- }
- ],
- "match_type" : "lpm",
- "type" : "simple",
- "max_size" : 1024,
- "with_counters" : true,
- "support_timeout" : false,
- "direct_meters" : null,
- "action_ids" : [20, 7],
- "actions" : ["forwarding.set_next_id", "NoAction"],
- "base_default_next" : "forwarding.acl",
- "next_tables" : {
- "forwarding.set_next_id" : "forwarding.acl",
- "NoAction" : "forwarding.acl"
- },
- "default_entry" : {
- "action_id" : 7,
- "action_const" : false,
- "action_data" : [],
- "action_entry_const" : false
- }
- },
- {
- "name" : "forwarding.acl",
- "id" : 10,
- "source_info" : {
- "filename" : "include/control/forwarding.p4",
- "line" : 124,
+ "line" : 127,
"column" : 10,
"source_fragment" : "acl"
},
@@ -3346,7 +3063,7 @@
"with_counters" : true,
"support_timeout" : false,
"direct_meters" : null,
- "action_ids" : [21, 23, 15, 1],
+ "action_ids" : [17, 19, 13, 1],
"actions" : ["forwarding.set_next_id", "forwarding.duplicate_to_controller", "forwarding.drop", "nop"],
"base_default_next" : "next.simple",
"next_tables" : {
@@ -3364,7 +3081,7 @@
},
{
"name" : "next.simple",
- "id" : 11,
+ "id" : 9,
"source_info" : {
"filename" : "include/control/next.p4",
"line" : 89,
@@ -3384,7 +3101,7 @@
"with_counters" : true,
"support_timeout" : false,
"direct_meters" : null,
- "action_ids" : [24, 25, 26, 29, 8],
+ "action_ids" : [20, 21, 22, 25, 6],
"actions" : ["next.output", "next.set_vlan_output", "next.l3_routing", "next.mpls_routing_v4", "NoAction"],
"base_default_next" : null,
"next_tables" : {
@@ -3392,7 +3109,7 @@
"__MISS__" : "tbl_act_2"
},
"default_entry" : {
- "action_id" : 8,
+ "action_id" : 6,
"action_const" : false,
"action_data" : [],
"action_entry_const" : false
@@ -3400,6 +3117,52 @@
},
{
"name" : "tbl_act_1",
+ "id" : 10,
+ "key" : [],
+ "match_type" : "exact",
+ "type" : "simple",
+ "max_size" : 1024,
+ "with_counters" : false,
+ "support_timeout" : false,
+ "direct_meters" : null,
+ "action_ids" : [30],
+ "actions" : ["act_1"],
+ "base_default_next" : "node_19",
+ "next_tables" : {
+ "act_1" : "node_19"
+ },
+ "default_entry" : {
+ "action_id" : 30,
+ "action_const" : true,
+ "action_data" : [],
+ "action_entry_const" : true
+ }
+ },
+ {
+ "name" : "tbl_act_2",
+ "id" : 11,
+ "key" : [],
+ "match_type" : "exact",
+ "type" : "simple",
+ "max_size" : 1024,
+ "with_counters" : false,
+ "support_timeout" : false,
+ "direct_meters" : null,
+ "action_ids" : [31],
+ "actions" : ["act_2"],
+ "base_default_next" : "node_19",
+ "next_tables" : {
+ "act_2" : "node_19"
+ },
+ "default_entry" : {
+ "action_id" : 31,
+ "action_const" : true,
+ "action_data" : [],
+ "action_entry_const" : true
+ }
+ },
+ {
+ "name" : "tbl_act_3",
"id" : 12,
"key" : [],
"match_type" : "exact",
@@ -3408,83 +3171,14 @@
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
- "action_ids" : [34],
- "actions" : ["act_1"],
- "base_default_next" : "node_23",
- "next_tables" : {
- "act_1" : "node_23"
- },
- "default_entry" : {
- "action_id" : 34,
- "action_const" : true,
- "action_data" : [],
- "action_entry_const" : true
- }
- },
- {
- "name" : "tbl_act_2",
- "id" : 13,
- "key" : [],
- "match_type" : "exact",
- "type" : "simple",
- "max_size" : 1024,
- "with_counters" : false,
- "support_timeout" : false,
- "direct_meters" : null,
- "action_ids" : [35],
- "actions" : ["act_2"],
- "base_default_next" : "node_23",
- "next_tables" : {
- "act_2" : "node_23"
- },
- "default_entry" : {
- "action_id" : 35,
- "action_const" : true,
- "action_data" : [],
- "action_entry_const" : true
- }
- },
- {
- "name" : "tbl_act_3",
- "id" : 14,
- "key" : [],
- "match_type" : "exact",
- "type" : "simple",
- "max_size" : 1024,
- "with_counters" : false,
- "support_timeout" : false,
- "direct_meters" : null,
- "action_ids" : [36],
+ "action_ids" : [32],
"actions" : ["act_3"],
"base_default_next" : "next.hashed",
"next_tables" : {
"act_3" : "next.hashed"
},
"default_entry" : {
- "action_id" : 36,
- "action_const" : true,
- "action_data" : [],
- "action_entry_const" : true
- }
- },
- {
- "name" : "tbl_act_4",
- "id" : 15,
- "key" : [],
- "match_type" : "exact",
- "type" : "simple",
- "max_size" : 1024,
- "with_counters" : false,
- "support_timeout" : false,
- "direct_meters" : null,
- "action_ids" : [37],
- "actions" : ["act_4"],
- "base_default_next" : "next.hashed",
- "next_tables" : {
- "act_4" : "next.hashed"
- },
- "default_entry" : {
- "action_id" : 37,
+ "action_id" : 32,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
@@ -3492,7 +3186,7 @@
},
{
"name" : "next.hashed",
- "id" : 16,
+ "id" : 13,
"source_info" : {
"filename" : "include/control/next.p4",
"line" : 103,
@@ -3513,7 +3207,7 @@
"with_counters" : true,
"support_timeout" : false,
"direct_meters" : null,
- "action_ids" : [27, 30, 31, 9],
+ "action_ids" : [23, 26, 27, 7],
"actions" : ["next.l3_routing", "next.mpls_routing_v4", "next.mpls_routing_v6", "NoAction"],
"base_default_next" : "next.broadcast",
"next_tables" : {
@@ -3525,7 +3219,7 @@
},
{
"name" : "next.broadcast",
- "id" : 17,
+ "id" : 14,
"source_info" : {
"filename" : "include/control/next.p4",
"line" : 126,
@@ -3545,23 +3239,23 @@
"with_counters" : true,
"support_timeout" : false,
"direct_meters" : null,
- "action_ids" : [28, 10],
+ "action_ids" : [24, 8],
"actions" : ["next.set_mcast_group", "NoAction"],
- "base_default_next" : "node_31",
+ "base_default_next" : "node_25",
"next_tables" : {
- "next.set_mcast_group" : "node_31",
- "NoAction" : "node_31"
+ "next.set_mcast_group" : "node_25",
+ "NoAction" : "node_25"
},
"default_entry" : {
- "action_id" : 10,
+ "action_id" : 8,
"action_const" : false,
"action_data" : [],
"action_entry_const" : false
}
},
{
- "name" : "tbl_act_5",
- "id" : 18,
+ "name" : "tbl_act_4",
+ "id" : 15,
"key" : [],
"match_type" : "exact",
"type" : "simple",
@@ -3569,14 +3263,37 @@
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
- "action_ids" : [38],
- "actions" : ["act_5"],
- "base_default_next" : "node_33",
+ "action_ids" : [33],
+ "actions" : ["act_4"],
+ "base_default_next" : "node_27",
"next_tables" : {
- "act_5" : "node_33"
+ "act_4" : "node_27"
},
"default_entry" : {
- "action_id" : 38,
+ "action_id" : 33,
+ "action_const" : true,
+ "action_data" : [],
+ "action_entry_const" : true
+ }
+ },
+ {
+ "name" : "tbl_act_5",
+ "id" : 16,
+ "key" : [],
+ "match_type" : "exact",
+ "type" : "simple",
+ "max_size" : 1024,
+ "with_counters" : false,
+ "support_timeout" : false,
+ "direct_meters" : null,
+ "action_ids" : [34],
+ "actions" : ["act_5"],
+ "base_default_next" : "node_29",
+ "next_tables" : {
+ "act_5" : "node_29"
+ },
+ "default_entry" : {
+ "action_id" : 34,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
@@ -3584,7 +3301,7 @@
},
{
"name" : "tbl_act_6",
- "id" : 19,
+ "id" : 17,
"key" : [],
"match_type" : "exact",
"type" : "simple",
@@ -3592,37 +3309,14 @@
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
- "action_ids" : [39],
+ "action_ids" : [35],
"actions" : ["act_6"],
- "base_default_next" : "node_35",
- "next_tables" : {
- "act_6" : "node_35"
- },
- "default_entry" : {
- "action_id" : 39,
- "action_const" : true,
- "action_data" : [],
- "action_entry_const" : true
- }
- },
- {
- "name" : "tbl_act_7",
- "id" : 20,
- "key" : [],
- "match_type" : "exact",
- "type" : "simple",
- "max_size" : 1024,
- "with_counters" : false,
- "support_timeout" : false,
- "direct_meters" : null,
- "action_ids" : [40],
- "actions" : ["act_7"],
"base_default_next" : null,
"next_tables" : {
- "act_7" : null
+ "act_6" : null
},
"default_entry" : {
- "action_id" : 40,
+ "action_id" : 35,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
@@ -3690,7 +3384,7 @@
"id" : 1,
"source_info" : {
"filename" : "include/control/forwarding.p4",
- "line" : 154,
+ "line" : 157,
"column" : 11,
"source_fragment" : "fabric_metadata.fwd_type == FWD_BRIDGING"
},
@@ -3716,7 +3410,7 @@
"id" : 2,
"source_info" : {
"filename" : "include/control/forwarding.p4",
- "line" : 155,
+ "line" : 158,
"column" : 17,
"source_fragment" : "fabric_metadata.fwd_type == FWD_MPLS"
},
@@ -3742,7 +3436,7 @@
"id" : 3,
"source_info" : {
"filename" : "include/control/forwarding.p4",
- "line" : 162,
+ "line" : 165,
"column" : 17,
"source_fragment" : "fabric_metadata.fwd_type == FWD_IPV4_UNICAST"
},
@@ -3768,7 +3462,7 @@
"id" : 4,
"source_info" : {
"filename" : "include/control/forwarding.p4",
- "line" : 163,
+ "line" : 166,
"column" : 17,
"source_fragment" : "fabric_metadata.fwd_type == FWD_IPV4_MULTICAST"
},
@@ -3787,63 +3481,11 @@
}
},
"true_next" : "forwarding.multicast_v4",
- "false_next" : "node_15"
- },
- {
- "name" : "node_15",
- "id" : 5,
- "source_info" : {
- "filename" : "include/control/forwarding.p4",
- "line" : 164,
- "column" : 17,
- "source_fragment" : "fabric_metadata.fwd_type == FWD_IPV6_UNICAST"
- },
- "expression" : {
- "type" : "expression",
- "value" : {
- "op" : "==",
- "left" : {
- "type" : "field",
- "value" : ["scalars", "fabric_metadata_t.fwd_type"]
- },
- "right" : {
- "type" : "hexstr",
- "value" : "0x04"
- }
- }
- },
- "true_next" : "forwarding.unicast_v6",
- "false_next" : "node_17"
- },
- {
- "name" : "node_17",
- "id" : 6,
- "source_info" : {
- "filename" : "include/control/forwarding.p4",
- "line" : 165,
- "column" : 17,
- "source_fragment" : "fabric_metadata.fwd_type == FWD_IPV6_MULTICAST"
- },
- "expression" : {
- "type" : "expression",
- "value" : {
- "op" : "==",
- "left" : {
- "type" : "field",
- "value" : ["scalars", "fabric_metadata_t.fwd_type"]
- },
- "right" : {
- "type" : "hexstr",
- "value" : "0x05"
- }
- }
- },
- "true_next" : "forwarding.multicast_v6",
"false_next" : "forwarding.acl"
},
{
- "name" : "node_23",
- "id" : 7,
+ "name" : "node_19",
+ "id" : 5,
"expression" : {
"type" : "expression",
"value" : {
@@ -3855,12 +3497,12 @@
}
}
},
- "true_next" : "node_24",
+ "true_next" : "node_20",
"false_next" : "next.hashed"
},
{
- "name" : "node_24",
- "id" : 8,
+ "name" : "node_20",
+ "id" : 6,
"source_info" : {
"filename" : "include/control/next.p4",
"line" : 138,
@@ -3885,12 +3527,12 @@
}
}
},
- "true_next" : "node_25",
+ "true_next" : "node_21",
"false_next" : "next.hashed"
},
{
- "name" : "node_25",
- "id" : 9,
+ "name" : "node_21",
+ "id" : 7,
"source_info" : {
"filename" : "include/control/next.p4",
"line" : 139,
@@ -3909,34 +3551,11 @@
}
},
"true_next" : "tbl_act_3",
- "false_next" : "node_27"
- },
- {
- "name" : "node_27",
- "id" : 10,
- "source_info" : {
- "filename" : "include/control/next.p4",
- "line" : 142,
- "column" : 25,
- "source_fragment" : "hdr.ipv6.isValid()"
- },
- "expression" : {
- "type" : "expression",
- "value" : {
- "op" : "d2b",
- "left" : null,
- "right" : {
- "type" : "field",
- "value" : ["ipv6", "$valid$"]
- }
- }
- },
- "true_next" : "tbl_act_4",
"false_next" : "next.hashed"
},
{
- "name" : "node_31",
- "id" : 11,
+ "name" : "node_25",
+ "id" : 8,
"source_info" : {
"filename" : "include/control/port_counter.p4",
"line" : 27,
@@ -3957,12 +3576,12 @@
}
}
},
- "true_next" : "tbl_act_5",
- "false_next" : "node_33"
+ "true_next" : "tbl_act_4",
+ "false_next" : "node_27"
},
{
- "name" : "node_33",
- "id" : 12,
+ "name" : "node_27",
+ "id" : 9,
"source_info" : {
"filename" : "include/control/port_counter.p4",
"line" : 30,
@@ -3983,15 +3602,15 @@
}
}
},
- "true_next" : "tbl_act_6",
- "false_next" : "node_35"
+ "true_next" : "tbl_act_5",
+ "false_next" : "node_29"
},
{
- "name" : "node_35",
- "id" : 13,
+ "name" : "node_29",
+ "id" : 10,
"source_info" : {
"filename" : "include/control/next.p4",
- "line" : 159,
+ "line" : 161,
"column" : 12,
"source_fragment" : "fabric_metadata.pop_vlan_at_egress"
},
@@ -4007,7 +3626,7 @@
}
},
"false_next" : null,
- "true_next" : "tbl_act_7"
+ "true_next" : "tbl_act_6"
}
]
},
@@ -4020,11 +3639,11 @@
"column" : 8,
"source_fragment" : "FabricEgress"
},
- "init_table" : "node_39",
+ "init_table" : "node_33",
"tables" : [
{
- "name" : "tbl_act_8",
- "id" : 21,
+ "name" : "tbl_act_7",
+ "id" : 18,
"key" : [],
"match_type" : "exact",
"type" : "simple",
@@ -4032,14 +3651,14 @@
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
- "action_ids" : [41],
- "actions" : ["act_8"],
+ "action_ids" : [36],
+ "actions" : ["act_7"],
"base_default_next" : null,
"next_tables" : {
- "act_8" : null
+ "act_7" : null
},
"default_entry" : {
- "action_id" : 41,
+ "action_id" : 36,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
@@ -4049,8 +3668,8 @@
"action_profiles" : [],
"conditionals" : [
{
- "name" : "node_39",
- "id" : 14,
+ "name" : "node_33",
+ "id" : 11,
"source_info" : {
"filename" : "include/control/packetio.p4",
"line" : 38,
@@ -4072,7 +3691,7 @@
}
},
"false_next" : null,
- "true_next" : "tbl_act_8"
+ "true_next" : "tbl_act_7"
}
]
}
diff --git a/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric.p4info b/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric.p4info
index de1bf1e..80e0880 100644
--- a/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric.p4info
+++ b/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric.p4info
@@ -171,56 +171,6 @@
}
tables {
preamble {
- id: 33608345
- name: "forwarding.unicast_v6"
- alias: "unicast_v6"
- }
- match_fields {
- id: 1
- name: "hdr.ipv6.dst_addr"
- bitwidth: 128
- match_type: LPM
- }
- action_refs {
- id: 16829931
- }
- action_refs {
- id: 16800567
- annotations: "@defaultonly()"
- }
- direct_resource_ids: 301998193
- size: 1024
-}
-tables {
- preamble {
- id: 33592333
- name: "forwarding.multicast_v6"
- alias: "multicast_v6"
- }
- match_fields {
- id: 1
- name: "hdr.vlan_tag.vlan_id"
- bitwidth: 12
- match_type: EXACT
- }
- match_fields {
- id: 2
- name: "hdr.ipv6.dst_addr"
- bitwidth: 128
- match_type: LPM
- }
- action_refs {
- id: 16829931
- }
- action_refs {
- id: 16800567
- annotations: "@defaultonly()"
- }
- direct_resource_ids: 302003792
- size: 1024
-}
-tables {
- preamble {
id: 33587782
name: "forwarding.acl"
alias: "acl"
@@ -712,28 +662,6 @@
}
direct_counters {
preamble {
- id: 301998193
- name: "forwarding.unicast_v6_counter"
- alias: "unicast_v6_counter"
- }
- spec {
- unit: BOTH
- }
- direct_table_id: 33608345
-}
-direct_counters {
- preamble {
- id: 302003792
- name: "forwarding.multicast_v6_counter"
- alias: "multicast_v6_counter"
- }
- spec {
- unit: BOTH
- }
- direct_table_id: 33592333
-}
-direct_counters {
- preamble {
id: 302000008
name: "forwarding.acl_counter"
alias: "acl_counter"