@@ -54,7 +54,7 @@ parser IntReportParser (packet_in packet,
5454 fabric_md .int_report_md .ip_eth_type = ETHERTYPE_IPV4 ;
5555 fabric_md .int_report_md .report_type = IntReportType_t .DROP ;
5656 fabric_md .int_report_md .mirror_type = FabricMirrorType_t .INVALID ;
57- fabric_md .int_report_md .gtpu_presence = fabric_md .bridged .base .gtpu_presence ;
57+ fabric_md .int_report_md .encap_presence = fabric_md .bridged .base .encap_presence ;
5858 fabric_md .int_report_md .flow_hash = fabric_md .bridged .base .inner_hash ;
5959
6060 /* * report_fixed_header **/
@@ -174,11 +174,12 @@ parser IntReportParser (packet_in packet,
174174
175175 state check_eth_type {
176176 packet .extract (hdr .eth_type );
177- transition select (hdr .eth_type .value , fabric_md .int_report_md .gtpu_presence ) {
177+ transition select (hdr .eth_type .value , fabric_md .int_report_md .encap_presence ) {
178178 (ETHERTYPE_MPLS , _ ): strip_mpls ;
179- (ETHERTYPE_IPV4 , GtpuPresence .NONE ): handle_ipv4 ;
180- (ETHERTYPE_IPV4 , GtpuPresence .GTPU_ONLY ): strip_ipv4_udp_gtpu ;
181- (ETHERTYPE_IPV4 , GtpuPresence .GTPU_WITH_PSC ): strip_ipv4_udp_gtpu_psc ;
179+ (ETHERTYPE_IPV4 , EncapPresence .NONE ): handle_ipv4 ;
180+ (ETHERTYPE_IPV4 , EncapPresence .GTPU_ONLY ): strip_ipv4_udp_gtpu ;
181+ (ETHERTYPE_IPV4 , EncapPresence .GTPU_WITH_PSC ): strip_ipv4_udp_gtpu_psc ;
182+ (ETHERTYPE_IPV4 , EncapPresence .VXLAN ): strip_ipv4_udp_vxlan ;
182183 default : reject ;
183184 }
184185 }
@@ -188,10 +189,11 @@ parser IntReportParser (packet_in packet,
188189 state strip_mpls {
189190 packet .advance (MPLS_HDR_BYTES * 8 );
190191 bit <IP_VER_BITS > ip_ver = packet .lookahead <bit <IP_VER_BITS >>();
191- transition select (ip_ver , fabric_md .int_report_md .gtpu_presence ) {
192- (IP_VERSION_4 , GtpuPresence .NONE ): handle_ipv4 ;
193- (IP_VERSION_4 , GtpuPresence .GTPU_ONLY ): strip_ipv4_udp_gtpu ;
194- (IP_VERSION_4 , GtpuPresence .GTPU_WITH_PSC ): strip_ipv4_udp_gtpu_psc ;
192+ transition select (ip_ver , fabric_md .int_report_md .encap_presence ) {
193+ (IP_VERSION_4 , EncapPresence .NONE ): handle_ipv4 ;
194+ (IP_VERSION_4 , EncapPresence .GTPU_ONLY ): strip_ipv4_udp_gtpu ;
195+ (IP_VERSION_4 , EncapPresence .GTPU_WITH_PSC ): strip_ipv4_udp_gtpu_psc ;
196+ (IP_VERSION_4 , EncapPresence .VXLAN ): strip_ipv4_udp_vxlan ;
195197 default : reject ;
196198 }
197199 }
@@ -207,6 +209,15 @@ parser IntReportParser (packet_in packet,
207209 transition handle_ipv4 ;
208210 }
209211
212+ state strip_ipv4_udp_vxlan {
213+ packet .advance ((IPV4_HDR_BYTES + UDP_HDR_BYTES + VXLAN_HDR_BYTES ) * 8 );
214+ // Skip the Ethernet header.
215+ // It will be removed from a packet and the outer Ethernet will be used
216+ // as the inner Ethernet header.
217+ packet .advance ((ETH_HDR_BYTES ) * 8 );
218+ transition handle_ipv4 ;
219+ }
220+
210221 state handle_ipv4 {
211222 // Extract only the length, required later to compute the lenght of the
212223 // report encap headers.
0 commit comments