Support IPv4 multicast in P4 fabric pipeline
- Multicast can use the same table as unicast. Merge into one.
- Allow masked destination MAC in classifier table
Note:
- Pipeliner now translates all exact MAC match to masked match with FF:FF:FF:FF:FF:FF mask.
- Interpreter now only uses masked src/dst MAC
Change-Id: Ibd27ebfb2d72ba929031f07a29927eb6f1844f11
diff --git a/pipelines/fabric/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json b/pipelines/fabric/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json
index dfb2b04..2885ebd 100644
--- a/pipelines/fabric/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json
+++ b/pipelines/fabric/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json
@@ -1387,10 +1387,10 @@
"binding" : "FabricIngress.forwarding.mpls"
},
{
- "name" : "FabricIngress.forwarding.unicast_v4_counter",
+ "name" : "FabricIngress.forwarding.routing_v4_counter",
"id" : 6,
"is_direct" : true,
- "binding" : "FabricIngress.forwarding.unicast_v4"
+ "binding" : "FabricIngress.forwarding.routing_v4"
},
{
"name" : "FabricIngress.forwarding.acl_counter",
@@ -2024,7 +2024,7 @@
]
},
{
- "name" : "FabricIngress.forwarding.set_next_id_unicast_v4",
+ "name" : "FabricIngress.forwarding.set_next_id_routing_v4",
"id" : 18,
"runtime_data" : [
{
@@ -9531,7 +9531,7 @@
"mask" : null
},
{
- "match_type" : "exact",
+ "match_type" : "ternary",
"name" : "hdr.ethernet.dst_addr",
"target" : ["ethernet", "dst_addr"],
"mask" : null
@@ -9543,7 +9543,7 @@
"mask" : null
}
],
- "match_type" : "exact",
+ "match_type" : "ternary",
"type" : "simple",
"max_size" : 1024,
"with_counters" : true,
@@ -9689,13 +9689,13 @@
}
},
{
- "name" : "FabricIngress.forwarding.unicast_v4",
+ "name" : "FabricIngress.forwarding.routing_v4",
"id" : 9,
"source_info" : {
"filename" : "include/control/forwarding.p4",
"line" : 87,
"column" : 10,
- "source_fragment" : "unicast_v4"
+ "source_fragment" : "routing_v4"
},
"key" : [
{
@@ -9712,10 +9712,10 @@
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [18, 4],
- "actions" : ["FabricIngress.forwarding.set_next_id_unicast_v4", "NoAction"],
+ "actions" : ["FabricIngress.forwarding.set_next_id_routing_v4", "NoAction"],
"base_default_next" : "FabricIngress.forwarding.acl",
"next_tables" : {
- "FabricIngress.forwarding.set_next_id_unicast_v4" : "FabricIngress.forwarding.acl",
+ "FabricIngress.forwarding.set_next_id_routing_v4" : "FabricIngress.forwarding.acl",
"NoAction" : "FabricIngress.forwarding.acl"
},
"default_entry" : {
@@ -10403,7 +10403,7 @@
"id" : 2,
"source_info" : {
"filename" : "include/control/forwarding.p4",
- "line" : 235,
+ "line" : 186,
"column" : 11,
"source_fragment" : "fabric_metadata.fwd_type == FWD_BRIDGING"
},
@@ -10429,7 +10429,7 @@
"id" : 3,
"source_info" : {
"filename" : "include/control/forwarding.p4",
- "line" : 236,
+ "line" : 187,
"column" : 17,
"source_fragment" : "fabric_metadata.fwd_type == FWD_MPLS"
},
@@ -10455,7 +10455,7 @@
"id" : 4,
"source_info" : {
"filename" : "include/control/forwarding.p4",
- "line" : 250,
+ "line" : 193,
"column" : 17,
"source_fragment" : "fabric_metadata.fwd_type == FWD_IPV4_UNICAST"
},
@@ -10473,7 +10473,7 @@
}
}
},
- "true_next" : "FabricIngress.forwarding.unicast_v4",
+ "true_next" : "FabricIngress.forwarding.routing_v4",
"false_next" : "FabricIngress.forwarding.acl"
},
{
diff --git a/pipelines/fabric/src/main/resources/p4c-out/fabric-int/bmv2/default/p4info.txt b/pipelines/fabric/src/main/resources/p4c-out/fabric-int/bmv2/default/p4info.txt
index 53a3653..f82a75e 100644
--- a/pipelines/fabric/src/main/resources/p4c-out/fabric-int/bmv2/default/p4info.txt
+++ b/pipelines/fabric/src/main/resources/p4c-out/fabric-int/bmv2/default/p4info.txt
@@ -101,7 +101,7 @@
id: 2
name: "hdr.ethernet.dst_addr"
bitwidth: 48
- match_type: EXACT
+ match_type: TERNARY
}
match_fields {
id: 3
@@ -171,9 +171,9 @@
}
tables {
preamble {
- id: 33586372
- name: "FabricIngress.forwarding.unicast_v4"
- alias: "unicast_v4"
+ id: 33562650
+ name: "FabricIngress.forwarding.routing_v4"
+ alias: "routing_v4"
}
match_fields {
id: 1
@@ -182,13 +182,13 @@
match_type: LPM
}
action_refs {
- id: 16828976
+ id: 16777434
}
action_refs {
id: 16800567
annotations: "@defaultonly()"
}
- direct_resource_ids: 318768492
+ direct_resource_ids: 318811107
size: 1024
idle_timeout_behavior: NO_TIMEOUT
}
@@ -747,9 +747,9 @@
}
actions {
preamble {
- id: 16828976
- name: "FabricIngress.forwarding.set_next_id_unicast_v4"
- alias: "set_next_id_unicast_v4"
+ id: 16777434
+ name: "FabricIngress.forwarding.set_next_id_routing_v4"
+ alias: "set_next_id_routing_v4"
}
params {
id: 1
@@ -1487,14 +1487,14 @@
}
direct_counters {
preamble {
- id: 318768492
- name: "FabricIngress.forwarding.unicast_v4_counter"
- alias: "unicast_v4_counter"
+ id: 318811107
+ name: "FabricIngress.forwarding.routing_v4_counter"
+ alias: "routing_v4_counter"
}
spec {
unit: BOTH
}
- direct_table_id: 33586372
+ direct_table_id: 33562650
}
direct_counters {
preamble {