eth_type moved outside ethernet header in fabric.p4
Change-Id: I3ae0813c5e8aba48767d5bb235fbbcfb75954010
diff --git a/pipelines/fabric/impl/src/main/resources/include/control/filtering.p4 b/pipelines/fabric/impl/src/main/resources/include/control/filtering.p4
index a3213e9..17dba78 100644
--- a/pipelines/fabric/impl/src/main/resources/include/control/filtering.p4
+++ b/pipelines/fabric/impl/src/main/resources/include/control/filtering.p4
@@ -91,9 +91,8 @@
key = {
standard_metadata.ingress_port : exact @name("ig_port");
hdr.ethernet.dst_addr : ternary @name("eth_dst");
- fabric_metadata.is_ipv4 : exact @name("is_ipv4");
- fabric_metadata.is_ipv6 : exact @name("is_ipv6");
- fabric_metadata.is_mpls : exact @name("is_mpls");
+ hdr.eth_type.value : ternary @name("eth_type");
+ fabric_metadata.ip_eth_type : exact @name("ip_eth_type");
}
actions = {
set_forwarding_type;
@@ -126,22 +125,6 @@
fabric_metadata.mpls_ttl = DEFAULT_MPLS_TTL + 1;
}
- // Set last_eth_type checking the validity of the L2.5 headers
- if (hdr.mpls.isValid()) {
- fabric_metadata.last_eth_type = ETHERTYPE_MPLS;
- } else {
- if (hdr.vlan_tag.isValid()) {
-#if defined(WITH_XCONNECT) || defined(WITH_BNG) || defined(WITH_DOUBLE_VLAN_TERMINATION)
- if(hdr.inner_vlan_tag.isValid()) {
- fabric_metadata.last_eth_type = hdr.inner_vlan_tag.eth_type;
- } else
-#endif // WITH_XCONNECT || WITH_BNG || WITH_DOUBLE_VLAN_TERMINATION
- fabric_metadata.last_eth_type = hdr.vlan_tag.eth_type;
- } else {
- fabric_metadata.last_eth_type = hdr.ethernet.eth_type;
- }
- }
-
ingress_port_vlan.apply();
fwd_classifier.apply();
}