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/parser.p4 b/pipelines/fabric/src/main/resources/include/parser.p4
index b5eadbc..67cc443 100644
--- a/pipelines/fabric/src/main/resources/include/parser.p4
+++ b/pipelines/fabric/src/main/resources/include/parser.p4
@@ -41,8 +41,6 @@
packet.extract(hdr.ethernet);
fabric_metadata.original_ether_type = hdr.ethernet.ether_type;
transition select(hdr.ethernet.ether_type){
- ETHERTYPE_QINQ_NON_STD: parse_vlan_tag;
- ETHERTYPE_QINQ: parse_vlan_tag;
ETHERTYPE_VLAN: parse_vlan_tag;
ETHERTYPE_MPLS: parse_mpls;
ETHERTYPE_ARP: parse_arp;
@@ -55,20 +53,10 @@
state parse_vlan_tag {
packet.extract(hdr.vlan_tag);
transition select(hdr.vlan_tag.ether_type){
- ETHERTYPE_VLAN: parse_inner_vlan_tag;
ETHERTYPE_ARP: parse_arp;
ETHERTYPE_IPV4: parse_ipv4;
ETHERTYPE_IPV6: parse_ipv6;
- default: accept;
- }
- }
-
- state parse_inner_vlan_tag {
- packet.extract(hdr.inner_vlan_tag);
- transition select(hdr.vlan_tag.ether_type){
- ETHERTYPE_ARP: parse_arp;
- ETHERTYPE_IPV4: parse_ipv4;
- ETHERTYPE_IPV6: parse_ipv6;
+ ETHERTYPE_MPLS: parse_mpls;
default: accept;
}
}
@@ -139,7 +127,6 @@
packet.emit(hdr.packet_in);
packet.emit(hdr.ethernet);
packet.emit(hdr.vlan_tag);
- packet.emit(hdr.inner_vlan_tag);
packet.emit(hdr.mpls);
packet.emit(hdr.arp);
packet.emit(hdr.ipv4);