Fix VLAN and MPLS problem for fabric.p4
MPLS and VLAN won't work if we port fabric.p4 to PSA like architecture
Change-Id: Ife2ed4a09816981c712f4a3b78408536a21defee
diff --git a/pipelines/fabric/src/main/resources/include/control/forwarding.p4 b/pipelines/fabric/src/main/resources/include/control/forwarding.p4
index fc5f5b3..2993191 100644
--- a/pipelines/fabric/src/main/resources/include/control/forwarding.p4
+++ b/pipelines/fabric/src/main/resources/include/control/forwarding.p4
@@ -154,13 +154,10 @@
if(fabric_metadata.fwd_type == FWD_BRIDGING) bridging.apply();
else if (fabric_metadata.fwd_type == FWD_MPLS) {
mpls.apply();
- if (hdr.ipv4.isValid()) {
- hdr.ethernet.ether_type = ETHERTYPE_IPV4;
- fabric_metadata.original_ether_type = ETHERTYPE_IPV4;
- } else {
- hdr.ethernet.ether_type = ETHERTYPE_IPV6;
- fabric_metadata.original_ether_type = ETHERTYPE_IPV6;
- }
+
+ // TODO: IPv6
+ hdr.vlan_tag.ether_type = ETHERTYPE_IPV4;
+ fabric_metadata.original_ether_type = ETHERTYPE_IPV4;
}
else if (fabric_metadata.fwd_type == FWD_IPV4_UNICAST) unicast_v4.apply();
else if (fabric_metadata.fwd_type == FWD_IPV4_MULTICAST) multicast_v4.apply();