Fixes to fabric.p4 pipeline
- Fix ethernet matching fields in ACL (dst and src were inverted)
- When doing punt_to_cpu after setting a multicast group clear the mcast_grp metadata field
Change-Id: I456566929b118188a1b2a40ff3f4de4c6c63d5bb
diff --git a/pipelines/fabric/impl/src/main/resources/include/bng.p4 b/pipelines/fabric/impl/src/main/resources/include/bng.p4
index 5deb8ee..29537bf 100644
--- a/pipelines/fabric/impl/src/main/resources/include/bng.p4
+++ b/pipelines/fabric/impl/src/main/resources/include/bng.p4
@@ -42,6 +42,9 @@
action punt_to_cpu() {
smeta.egress_spec = CPU_PORT;
+ // Clean the multicast group, otherwise multicast decision
+ // will override the punting to CPU action
+ smeta.mcast_grp = 0;
c_control.count(fmeta.bng.line_id);
}
diff --git a/pipelines/fabric/impl/src/main/resources/include/control/acl.p4 b/pipelines/fabric/impl/src/main/resources/include/control/acl.p4
index 26267e9..80efa8f 100644
--- a/pipelines/fabric/impl/src/main/resources/include/control/acl.p4
+++ b/pipelines/fabric/impl/src/main/resources/include/control/acl.p4
@@ -63,8 +63,8 @@
fabric_metadata.ip_proto: ternary @name("ip_proto"); // 8
fabric_metadata.l4_sport: ternary @name("l4_sport"); // 16
fabric_metadata.l4_dport: ternary @name("l4_dport"); // 16
- hdr.ethernet.dst_addr: ternary @name("eth_src"); // 48
- hdr.ethernet.src_addr: ternary @name("eth_dst"); // 48
+ hdr.ethernet.dst_addr: ternary @name("eth_dst"); // 48
+ hdr.ethernet.src_addr: ternary @name("eth_src"); // 48
hdr.vlan_tag.vlan_id: ternary @name("vlan_id"); // 12
hdr.eth_type.value: ternary @name("eth_type"); //16
hdr.ipv4.src_addr: ternary @name("ipv4_src"); // 32