161. Unified Packet Type Tests

Unified packet type flag is supposed to recognize packet types and support all possible PMDs.

This 32 bits of packet_type can be divided into several sub fields to indicate different packet type information of a packet. The initial design is to divide those bits into fields for L2 types, L3 types, L4 types, tunnel types, inner L2 types, inner L3 types and inner L4 types. All PMDs should translate the offloaded packet types into these 7 fields of information, for user applications.

161.1. Prerequisites

Enable ABI and disable vector ixgbe driver in dpdk configuration file. Plug in different types of nic on the board. 1x Intel® XL710-DA2 (Eagle Fountain) 1x Intel® 82599 Gigabit Ethernet Controller 1x Intel® I350 Gigabit Network Connection 1x Intel® Ethernet 800 Series NIC

Start testpmd and then enable rxonly and verbose mode:

./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c f -n 4 -- -i
set fwd rxonly
set verbose 1
start

161.2. Test Case: L2 Packet detect

This case checked that whether Timesync, ARP, LLDP detection supported by Intel® Ethernet 700 Series.

Send time sync packet from tester:

sendp([Ether(dst='FF:FF:FF:FF:FF:FF',type=0x88f7)/"\\x00\\x02"], iface=txItf)

Check below message dumped by testpmd:

(outer) L2 type: ETHER_Timesync

Send ARP packet from tester:

sendp([Ether(dst='FF:FF:FF:FF:FF:FF')/ARP()], iface=txItf)

Check below message dumped by testpmd:

(outer) L2 type: ETHER_ARP

Send LLDP packet from tester:

sendp([Ether()/LLDP()/LLDPManagementAddress()], iface=txItf)

Check below message dumped by testpmd:

(outer) L2 type: ETHER_LLDP

161.3. Test Case: IPv4&L4 packet type detect

This case checked that whether L3 and L4 packet can be normally detected. Only Intel® Ethernet 700 Series can detect icmp packet. Only 82599 and i350 can detect ipv4 extension packet. Intel® Ethernet 700 Series did not detect whether packet contain ipv4 header options, so L3 type will be shown as IPV4_EXT_UNKNOWN. Intel® Ethernet 700 Series will identify all unrecognized L4 packet as L4_NONFRAG. Only Intel® Ethernet 700 Series can identify L4 fragment packet.

Send IP only packet and verify L2/L3/L4 corrected:

sendp([Ether()/IP()/Raw('\0'*60)], iface=txItf)

(outer) L2 type: ETHER
(outer) L3 type: IPV4
(outer) L4 type: Unknown

Send IP+UDP packet and verify L2/L3/L4 corrected:

sendp([Ether()/IP()/UDP()/Raw('\0'*60)], iface=txItf)

(outer) L4 type: UDP

Send IP+TCP packet and verify L2/L3/L4 corrected:

sendp([Ether()/IP()/TCP()/Raw('\0'*60)], iface=txItf)

(outer) L4 type: TCP

Send IP+SCTP packet and verify L2/L3/L4 corrected:

sendp([Ether()/IP()/SCTP()/Raw('\0'*60)], iface=txItf)

(outer) L4 type: SCTP

Send IP+ICMP packet and verify L2/L3/L4 corrected(Intel® Ethernet 700 Series):

sendp([Ether()/IP()/ICMP()/Raw('\0'*60)], iface=txItf)

(outer) L4 type: ICMP

Send IP fragment+TCP packet and verify L2/L3/L4 corrected(Intel® Ethernet 700 Series):

sendp([Ether()/IP(frag=5)/TCP()/Raw('\0'*60)], iface=txItf)

(outer) L2 type: ETHER
(outer) L3 type: IPV4_EXT_UNKNOWN
(outer) L4 type: L4_FRAG

Send IP extension packet and verify L2/L3 corrected(82599,i350):

sendp([Ether()/IP(ihl=10)/Raw('\0'*40)],iface=txItf)

(outer) L3 type: IPV4_EXT
(outer) L4 type: Unknown

Send IP extension+SCTP packet and verify L2/L3/L4 corrected(82599,i350):

sendp([Ether()/IP(ihl=10)/SCTP()/Raw('\0'*40)],iface=txItf)

(outer) L3 type: IPV4_EXT
(outer) L4 type: SCTP

161.4. Test Case: IPv6&L4 packet type detect

This case checked that whether IPv6 and L4 packet can be normally detected. Intel® Ethernet 700 Series did not detect whether packet contain ipv6 extension options, so L3 type will be shown as IPV6_EXT_UNKNOWN. Intel® Ethernet 700 Series will identify all unrecognized L4 packet as L4_NONFRAG. Only Intel® Ethernet 700 Series can identify L4 fragment packet.

Send IPv6 only packet and verify L2/L3/L4 corrected:

sendp([Ether()/IPv6()/Raw('\0'*60)], iface=txItf)

(outer) L2 type: ETHER
(outer) L3 type: IPV6
(outer) L4 type: Unknown

Send IPv6+UDP packet and verify L2/L3/L4 corrected:

sendp([Ether()/IPv6()/UDP()/Raw('\0'*60)], iface=txItf)

(outer) L4 type: UDP

Send IPv6+TCP packet and verify L2/L3/L4 corrected:

sendp([Ether()/IPv6()/TCP()/Raw('\0'*60)], iface=txItf)

(outer) L4 type: TCP

Send IPv6 fragment packet and verify L2/L3/L4 corrected(Intel® Ethernet 700 Series):

sendp([Ether()/IPv6()/IPv6ExtHdrFragment()/Raw('\0'*60)],iface=txItf)

(outer) L3 type: IPV6_EXT_UNKNOWN
(outer) L4 type: L4_FRAG

Send IPv6 fragment packet and verify L2/L3/L4 corrected(82599,i350):

sendp([Ether()/IPv6()/IPv6ExtHdrFragment()/Raw('\0'*60)],iface=txItf)

(outer) L3 type: IPV6_EXT
(outer) L4 type: Unknown

161.5. Test Case: IP in IPv4 tunnel packet type detect

This case checked that whether IP in IPv4 tunnel packet can be normally detected by Intel® Ethernet 700 Series.

Send IPv4+IPv4 fragment packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IP(frag=5)/UDP()/Raw('\0'*40)], iface=txItf)

(outer) L2 type: ETHER
(outer) L3 type: IPV4_EXT_UNKNOWN
(outer) L4 type: Unknown
Tunnel type: IP
Inner L2 type: Unknown
Inner L3 type: IPV4_EXT_UNKNOWN
Inner L4 type: L4_FRAG

Send IPv4+IPv4 packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IP()/Raw('\0'*40)],iface=txItf)

Inner L4 type: L4_NONFRAG

Send IPv4+IPv4+UDP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IP()/UDP()/Raw('\0'*40)],iface=txItf)

Inner L4 type: UDP

Send IPv4+IPv4+TCP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IP()/TCP()/Raw('\0'*40)],iface=txItf)

Inner L4 type: TCP

Send IPv4+IPv4+SCTP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IP()/SCTP()/Raw('\0'*40)],iface=txItf)

Inner L4 type: SCTP

Send IPv4+IPv4+ICMP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IP()/ICMP()/Raw('\0'*40)],iface=txItf)

Inner L4 type: ICMP

Send IPv4+IPv6 fragment packet and inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6()/IPv6ExtHdrFragment()/Raw('\0'*40)],iface=txItf)

Inner L3 type: IPV6_EXT_UNKNOWN
Inner L4 type: L4_FRAG

Send IPv4+IPv6 packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6()/Raw('\0'*40)],iface=txItf)

Inner L4 type: L4_NONFRAG

Send IPv4+IPv6+UDP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6()/UDP()/Raw('\0'*40)],iface=txItf)

Inner L4 type: UDP

Send IPv4+IPv6+TCP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6()/TCP()/Raw('\0'*40)],iface=txItf)

Inner L4 type: TCP

Send IPv4+IPv6+SCTP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6(nh=132)/SCTP()/Raw('\0'*40)],iface=txItf)

Inner L4 type: SCTP

Send IPv4+IPv6+ICMP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6(nh=58)/ICMP()/Raw('\0'*40)],iface=txItf)

Inner L4 type: ICMP

161.6. Test Case: IPv6 in IPv4 tunnel packet type detect by 82599 and i350

This case checked that whether IPv4 in IPv6 tunnel packet can be normally detected by 82599 and i350.

Send IPv4+IPv6 packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6()/Raw('\0'*40)], iface=txItf)

(outer) L2 type: ETHER
(outer) L3 type: IPV4
(outer) L4 type: Unknown
Tunnel type: IP
Inner L2 type: Unknown
Inner L3 type: IPV6
Inner L4 type: Unknown

Send IPv4+IPv6_EXT packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6()/IPv6ExtHdrRouting()/Raw('\0'*40)], iface=txItf)

Inner L3 type: IPV6_EXT

Send IPv4+IPv6+UDP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6()/UDP()/Raw('\0'*40)], iface=txItf)

Inner L4 type: UDP

Send IPv4+IPv6+TCP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6()/TCP()/Raw('\0'*40)], iface=txItf)

Inner L4 type: TCP

Send IPv4+IPv6_EXT+UDP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6()/IPv6ExtHdrRouting()/UDP()/Raw('\0'*40)],
iface=txItf)

Inner L3 type: IPV6_EXT
Inner L4 type: UDP

Send IPv4+IPv6_EXT+TCP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6()/IPv6ExtHdrRouting()/TCP()/Raw('\0'*40)],
iface=txItf)

Inner L3 type: IPV6_EXT
Inner L4 type: TCP

161.7. Test Case: IP in IPv6 tunnel packet type detect

This case checked that whether IP in IPv6 tunnel packet can be normally detected by Intel® Ethernet 700 Series.

Send IPv4+IPv4 fragment packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IP(frag=5)/UDP()/Raw('\0'*40)],iface=txItf)

(outer) L2 type: ETHER
(outer) L3 type: IPV4_EXT_UNKNOWN
(outer) L4 type: Unknown
Tunnel type: IP
Inner L2 type: Unknown
Inner L3 type: IPV4_EXT_UNKNOWN
Inner L4 type: L4_FRAG

Send IPv4+IPv4 packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IP()/Raw('\0'*40)],iface=txItf)

Inner L4 type: L4_NONFRAG

Send IPv4+IPv4+UDP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IP()/UDP()/Raw('\0'*40)],iface=txItf)

Inner L4 type: UDP

Send IPv4+IPv4+TCP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IP()/TCP()/Raw('\0'*40)],iface=txItf)

Inner L4 type: TCP

Send IPv4+IPv4+SCTP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IP()/SCTP()/Raw('\0'*40)],iface=txItf)

Inner L4 type: SCTP

Send IPv4+IPv4+ICMP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IP()/ICMP()/Raw('\0'*40)],iface=txItf)

Inner L4 type: ICMP

Send IPv4+IPv6 fragment packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6()/IPv6ExtHdrFragment()/Raw('\0'*40)],
iface=txItf)

Inner L3 type: IPV6_EXT_UNKNOWN
Inner L4 type: L4_FRAG

Send IPv4+IPv6 packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6()/Raw('\0'*40)], iface=txItf)

Inner L4 type: L4_NONFRAG

Send IPv4+IPv6+UDP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6()/UDP()/Raw('\0'*40)], iface=txItf)

Inner L4 type: UDP

Send IPv4+IPv6+TCP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6()/TCP()/Raw('\0'*40)], iface=txItf)

Inner L4 type: TCP

Send IPv4+IPv6+SCTP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6(nh=132)/SCTP()/Raw('\0'*40)], iface=txItf)

Inner L4 type: SCTP

Send IPv4+IPv6+ICMP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/IPv6(nh=58)/ICMP()/Raw('\0'*40)], iface=txItf)

Inner L4 type: ICMP

161.8. Test Case: NVGRE tunnel packet type detect

This case checked that whether NVGRE tunnel packet can be normally detected by Intel® Ethernet 700 Series. Intel® Ethernet 700 Series did not distinguish GRE/Teredo/Vxlan packets, all those types will be displayed as GRENAT.

Send IPv4+NVGRE fragment packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/NVGRE()/Ether()/IP(frag=5)/Raw('\0'*40)],
iface=txItf)

(outer) L2 type: ETHER
(outer) L3 type: IPV4_EXT_UNKNOWN
(outer) L4 type: Unknown
Tunnel type: GRENAT
Inner L2 type: ETHER
Inner L3 type: IPV4_EXT_UNKNOWN
Inner L4 type: L4_FRAG

Send IPV4+NVGRE+MAC packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/NVGRE()/Ether()/IP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: L4_NONFRAG

Send IPv4+NVGRE+MAC_VLAN packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/NVGRE()/Ether()/Dot1Q()/Raw('\0'*40)], iface=txItf)

Inner L2 type: ETHER_VLAN
Inner L4 type: Unknown

Send IPv4+NVGRE+MAC_VLAN+IPv4 fragment packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/NVGRE()/Ether()/Dot1Q()/IP(frag=5)/Raw('\0'*40)],
iface=txItf)

Inner L3 type: IPV4_EXT_UNKNOWN
Inner L4 type: L4_FRAG

Send IPv4+NVGRE+MAC_VLAN+IPv4 packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/NVGRE()/Ether()/Dot1Q()/IP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: L4_NONFRAG

Send IPv4+NVGRE+MAC_VLAN+IPv4+UDP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/NVGRE()/Ether()/Dot1Q()/IP()/UDP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: UDP

Send IPv4+NVGRE+MAC_VLAN+IPv4+TCP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/NVGRE()/Ether()/Dot1Q()/IP()/TCP()/Raw('\0'*40)],
iface=txItf)
Inner L4 type: TCP

Send IPv4+NVGRE+MAC_VLAN+IPv4+SCTP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/NVGRE()/Ether()/Dot1Q()/IP()/SCTP()/Raw('\0'*40)],
iface=txItf)
Inner L4 type: SCTP

Send IPv4+NVGRE+MAC_VLAN+IPv4+ICMP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/NVGRE()/Ether()/Dot1Q()/IP()/ICMP()/Raw('\0'*40)],
iface=txItf)
Inner L4 type: ICMP

Send IPv4+NVGRE+MAC_VLAN+IPv6+IPv6 fragment acket and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/NVGRE()/Ether()/Dot1Q()/IPv6()/IPv6ExtHdrFragment()/
Raw('\0'*40)], iface=txItf)

Inner L3 type: IPV6_EXT_UNKOWN
Inner L4 type: L4_FRAG

Send IPv4+NVGRE+MAC_VLAN+IPv6 packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/NVGRE()/Ether()/Dot1Q()/IPv6()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: L4_NONFRAG

Send IPv4+NVGRE+MAC_VLAN+IPv6+UDP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/NVGRE()/Ether()/Dot1Q()/IPv6()/UDP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: UDP

Send IPv4+NVGRE+MAC_VLAN+IPv6+TCP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/NVGRE()/Ether()/Dot1Q()/IPv6()/TCP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: TCP

Send IPv4+NVGRE+MAC_VLAN+IPv6+SCTP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/NVGRE()/Ether()/Dot1Q()/IPv6(nh=132)/SCTP()/
Raw('\0'*40)],iface=txItf)

Inner L4 type: SCTP

Send IPv4+NVGRE+MAC_VLAN+IPv6+ICMP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/NVGRE()/Ether()/Dot1Q()/IPv6(nh=58)/ICMP()/
Raw('\0'*40)],iface=txItf)

Inner L4 type: ICMP

161.9. Test Case: NVGRE in IPv6 tunnel packet type detect

This case checked that whether NVGRE in IPv6 tunnel packet can be normally detected by Intel® Ethernet 700 Series. Intel® Ethernet 700 Series did not distinguish GRE/Teredo/Vxlan packets, all those types will be displayed as GRENAT.

Send IPV6+NVGRE+MAC packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/Raw('\0'*18)], iface=txItf)

(outer) L2 type: ETHER
(outer) L3 type: IPV6_EXT_UNKNOWN
(outer) L4 type: Unknown
Tunnel type: GRENAT
Inner L2 type: ETHER
Inner L3 type: Unknown
Inner L4 type: Unknown

Send IPV6+NVGRE+MAC+IPv4 fragment packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/IP(frag=5)/Raw('\0'*40)],
iface=txItf)

Inner L3 type: IPV4_EXT_UNKNOWN
Inner L4 type: L4_FRAG

Send IPV6+NVGRE+MAC+IPv4 packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/IP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: L4_NONFRAG

Send IPV6+NVGRE+MAC+IPv4+UDP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/IP()/UDP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: UDP

Send IPV6+NVGRE+MAC+IPv4+TCP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/IP()/TCP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: TCP

Send IPV6+NVGRE+MAC+IPv4+SCTP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/IP()/SCTP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: SCTP

Send IPV6+NVGRE+MAC+IPv4+ICMP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/IP()/ICMP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: ICMP

Send IPV6+NVGRE+MAC+IPv6 fragment packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/IPv6()/IPv6ExtHdrFragment()
/Raw('\0'*40)],iface=txItf)

Inner L3 type: IPV6_EXT_UNKOWN
Inner L4 type: L4_FRAG

Send IPV6+NVGRE+MAC+IPv6 packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/IPv6()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: L4_NONFRAG

Send IPV6+NVGRE+MAC+IPv6+UDP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/IPv6()/UDP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: UDP

Send IPV6+NVGRE+MAC+IPv6+TCP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/IPv6()/TCP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: TCP

Send IPV6+NVGRE+MAC+IPv6+SCTP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/IPv6(nh=132)/SCTP()/
Raw('\0'*40)], iface=txItf)

Inner L4 type: SCTP

Send IPV6+NVGRE+MAC+IPv6+ICMP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/IPv6(nh=58)/ICMP()/
Raw('\0'*40)], iface=txItf)

Inner L4 type: ICMP

Send IPV6+NVGRE+MAC_VLAN+IPv4 fragment packet and inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/Dot1Q()/IP(frag=5)/
Raw('\0'*40)], iface=txItf)

Inner L2 type: ETHER_VLAN
Inner L3 type: IPV4_EXT_UNKNOWN
Inner L4 type: L4_FRAG

Send IPV6+NVGRE+MAC_VLAN+IPv4 packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/Dot1Q()/IP()/
Raw('\0'*40)], iface=txItf)

Inner L4 type: L4_NONFRAG

Send IPV6+NVGRE+MAC_VLAN+IPv4+UDP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/Dot1Q()/IP()/UDP()/
Raw('\0'*40)], iface=txItf)

Inner L4 type: UDP

Send IPV6+NVGRE+MAC_VLAN+IPv4+TCP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/Dot1Q()/IP()/TCP()/
Raw('\0'*40)], iface=txItf)

Inner L4 type: TCP

Send IPV6+NVGRE+MAC_VLAN+IPv4+SCTP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/Dot1Q()/IP()/SCTP()/
Raw('\0'*40)], iface=txItf)

Inner L4 type: SCTP

Send IPV6+NVGRE+MAC_VLAN+IPv4+ICMP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/Dot1Q()/IP()/ICMP()/
Raw('\0'*40)], iface=txItf)

Inner L4 type: ICMP

Send IPV6+NVGRE+MAC_VLAN+IPv6 fragment packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/Dot1Q()/IPv6()/
IPv6ExtHdrFragment()/Raw('\0'*40)], iface=txItf)

Inner L3 type: IPV6_EXT_UNKOWN
Inner L4 type: L4_FRAG

Send IPV6+NVGRE+MAC_VLAN+IPv6 packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/Dot1Q()/IPv6()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: L4_NONFRAG

Send IPV6+NVGRE+MAC_VLAN+IPv6+UDP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/Dot1Q()/IPv6()/UDP()/
Raw('\0'*40)], iface=txItf)

Inner L4 type: UDP

Send IPV6+NVGRE+MAC_VLAN+IPv6+TCP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/Dot1Q()/IPv6()/TCP()/
Raw('\0'*40)], iface=txItf)

Inner L4 type: TCP

Send IPV6+NVGRE+MAC_VLAN+IPv6+SCTP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/Dot1Q()/IPv6(nh=132)/SCTP()/
Raw('\0'*40)], iface=txItf)

Inner L4 type: SCTP

Send IPV6+NVGRE+MAC_VLAN+IPv6+ICMP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IPv6(nh=47)/NVGRE()/Ether()/Dot1Q()/IPv6(nh=58)/ICMP()/
Raw('\0'*40)], iface=txItf)

Inner L4 type: ICMP

161.10. Test Case: GRE tunnel packet type detect

This case checked that whether GRE tunnel packet can be normally detected by Intel® Ethernet 700 Series. Intel® Ethernet 700 Series did not distinguish GRE/Teredo/Vxlan packets, all those types will be displayed as GRENAT.

Send IPv4+GRE+IPv4 fragment packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/GRE()/IP(frag=5)/Raw('x'*40)], iface=txItf)

(outer) L2 type: ETHER
(outer) L3 type: IPV4_EXT_UNKNOWN
(outer) L4 type: Unknown
Tunnel type: GRENAT
Inner L2 type: Unknown
Inner L3 type: IPV4_EXT_UNKNOWN
Inner L4 type: L4_FRAG

Send IPv4+GRE+IPv4 packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/GRE()/IP()/Raw('x'*40)], iface=txItf)

Inner L4 type: L4_NONFRAG

Send IPv4+GRE+IPv4+UDP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/GRE()/IP()/UDP()/Raw('x'*40)], iface=txItf)

Inner L4 type: UDP

Send IPv4+GRE+IPv4+TCP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/GRE()/IP()/TCP()/Raw('x'*40)], iface=txItf)

Inner L4 type: TCP

Send IPv4+GRE+IPv4+SCTP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/GRE()/IP()/SCTP()/Raw('x'*40)], iface=txItf)

Inner L4 type: SCTP

Send IPv4+GRE+IPv4+ICMP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/GRE()/IP()/ICMP()/Raw('x'*40)], iface=txItf)

Inner L4 type: ICMP

Send IPv4+GRE packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/GRE()/Raw('x'*40)], iface=txItf)

Inner L3 type: Unknown
Inner L4 type: Unknown

161.11. Test Case: Vxlan tunnel packet type detect

This case checked that whether Vxlan tunnel packet can be normally detected by Intel® Ethernet 700 Series. Intel® Ethernet 700 Series did not distinguish GRE/Teredo/Vxlan packets, all those types will be displayed as GRENAT.

Add vxlan tunnel port filter on receive port:

rx_vxlan_port add 4789 0

Send IPv4+Vxlan+MAC+IPv4 fragment packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/UDP()/Vxlan()/Ether()/IP(frag=5)/Raw('\0'*40)],
iface=txItf)

(outer) L2 type: ETHER
(outer) L3 type: IPV4_EXT_UNKNOWN
(outer) L4 type: Unknown
Tunnel type: GRENAT
Inner L2 type: ETHER
Inner L3 type: IPV4_EXT_UNKNOWN
Inner L4 type: L4_FRAG

Send IPv4+Vxlan+MAC+IPv4 packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/UDP()/Vxlan()/Ether()/IP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: L4_NONFRAG

Send IPv4+Vxlan+MAC+IPv4+UDP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/UDP()/Vxlan()/Ether()/IP()/UDP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: UDP

Send IPv4+Vxlan+MAC+IPv4+TCP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/UDP()/Vxlan()/Ether()/IP()/TCP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: TCP

Send IPv4+Vxlan+MAC+IPv4+SCTP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/UDP()/Vxlan()/Ether()/IP()/SCTP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: SCTP

Send IPv4+Vxlan+MAC+IPv4+ICMP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/UDP()/Vxlan()/Ether()/IP()/ICMP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: ICMP

Send IPv4+Vxlan+MAC+IPv6 fragment packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/UDP()/Vxlan()/Ether()/IPv6()/IPv6ExtHdrFragment()/
Raw('\0'*40)], iface=txItf)

Inner L3 type: IPV6_EXT_UNKOWN
Inner L4 type: L4_FRAG

Send IPv4+Vxlan+MAC+IPv6 packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/UDP()/Vxlan()/Ether()/IPv6()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: L4_NONFRAG

Send IPv4+Vxlan+MAC+IPv6+UDP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/UDP()/Vxlan()/Ether()/IPv6()/UDP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: UDP

Send IPv4+Vxlan+MAC+IPv6+TCP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/UDP()/Vxlan()/Ether()/IPv6()/TCP()/Raw('\0'*40)],
iface=txItf)

Inner L4 type: TCP

Send IPv4+Vxlan+MAC+IPv6+SCTP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/UDP()/Vxlan()/Ether()/IPv6(nh=132)/SCTP()/
Raw('\0'*40)], iface=txItf)

Inner L4 type: SCTP

Send IPv4+Vxlan+MAC+IPv6+ICMP packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/UDP()/Vxlan()/Ether()/IPv6(nh=58)/ICMP()/
Raw('\0'*40)], iface=txItf)

Inner L4 type: ICMP

Send IPv4+Vxlan+MAC packet and verify inner and outer L2/L3/L4 corrected:

sendp([Ether()/IP()/UDP()/Vxlan()/Ether()/Raw('\0'*40)], iface=txItf)

Inner L3 type: Unknown
Inner L4 type: Unknown

161.12. Test Case: NSH

This case checks if NSH packets could be detected by I40e driver NIC

Send a ether+nsh packet and verify the detection message::

sendp([Ether(type=0x894f)/NSH(Len=0x6,NextProto=0x0,NSP=0x000002,NSI=0xff)], iface=txItf)

L2 type: L2_ETHER_NSH

Send a ether+nsh+ip packet and verify the detection message::

sendp([Ether(dst=”00:00:00:00:01:00”,type=0x894f)/NSH(Len=0x6,NextProto=0x1,NSP=0x000002,NSI=0xff)/IP()], iface=txItf)

L2 type: L2_ETHER_NSH L3 type: L3_IPV4_EXT_UNKNOWN L4 type: L4_NONFRAG

Send a ether+nsh+ip+icmp packet and verify the detection message::

sendp([Ether(type=0x894f)/NSH(Len=0x6,NextProto=0x1,NSP=0x000002,NSI=0xff)/IP()/ICMP()], iface=txItf)

L2 type: L2_ETHER_NSH L3 type: L3_IPV4_EXT_UNKNOWN L4 type: L4_ICMP

Send a ether+nsh+ip_frag packet and verify the detection message::

sendp([Ether(dst=”00:00:00:00:01:00”,type=0x894f)/NSH(Len=0x6,NextProto=0x1,NSP=0x000002,NSI=0xff)/IP(frag=1,flags=”MF”), iface=txItf)

L2 type: L2_ETHER_NSH L3 type: L3_IPV4_EXT_UNKNOWN L4 type: L4_FRAG

Send a ether+nsh+ip+tcp packet and verify the detection message::

sendp([Ether(type=0x894f)/NSH(Len=0x6,NextProto=0x1,NSP=0x000002,NSI=0xff)/IP()/TCP()], iface=txItf)

L2 type: L2_ETHER_NSH L3 type: L3_IPV4_EXT_UNKNOWN L4 type: L4_TCP

Send a ether+nsh+ip+udp packet verify the detection message::

sendp([Ether(dst=”00:00:00:00:01:00”,type=0x894f)/NSH(Len=0x6,NextProto=0x1,NSP=0x000002,NSI=0xff)/IP()/UDP()], iface=txItf)

L2 type: L2_ETHER_NSH L3 type: L3_IPV4_EXT_UNKNOWN L4 type: L4_UDP

Send a ether+nsh+ip+sctp packet and verify the detection message::

sendp([Ether(type=0x894f)/NSH(Len=0x6,NextProto=0x1,NSP=0x000002,NSI=0xff)/IP()/SCTP(tag=1)/SCTPChunkData(data=’X’ * 16)], iface=txItf)

L2 type: L2_ETHER_NSH L3 type: L3_IPV4_EXT_UNKNOWN L4 type: L4_SCTP

Send a ether+nsh+ipv6 packet and verify the detection message::

sendp([Ether(type=0x894f)/NSH(Len=0x6,NextProto=0x2,NSP=0x000002,NSI=0xff)/IPv6()], iface=txItf)

L2 type: L2_ETHER_NSH L3 type: L3_IPV6_EXT_UNKNOWN L4 type: L4_NONFRAG

Send a ether+nsh+ipv6+icmp packet and verify the detection message::

sendp([Ether(type=0x894f)/NSH(Len=0x6,NextProto=0x2,NSP=0x000002,NSI=0xff)/IPv6(src=”2001::1”,dst=”2003::2”,nh=0x3A)/ICMP()], iface=txItf)

L2 type: L2_ETHER_NSH L3 type: L3_IPV6_EXT_UNKNOWN L4 type: L4_ICMP

Send a ether+nsh+ipv6_frag packet and verify the detection message::

sendp([Ether(dst=”00:00:00:00:01:00”,type=0x894f)/NSH(Len=0x6,NextProto=0x2,NSP=0x000002,NSI=0xff)/IPv6()/IPv6ExtHdrFragment()], iface=txItf)

L2 type: L2_ETHER_NSH L3 type: L3_IPV6_EXT_UNKNOWN L4 type: L4_FRAG

Send a ether+nsh+ipv6+tcp packet and verify the detection message::

sendp([Ether(type=0x894f)/NSH(Len=0x6,NextProto=0x2,NSP=0x000002,NSI=0xff)/IPv6()/TCP()],iface=txItf)

L2 type: L2_ETHER_NSH L3 type: L3_IPV6_EXT_UNKNOWN L4 type: L4_TCP

Send a ether+nsh+ipv6+udp packet and verify the detection message::

sendp([Ether(dst=”00:00:00:00:01:00”,type=0x894f)/NSH(Len=0x6,NextProto=0x2,NSP=0x000002,NSI=0xff)/IPv6()/UDP()], iface=txItf)

L2 type: L2_ETHER_NSH L3 type: L3_IPV6_EXT_UNKNOWN L4 type: L4_UDP

Send a ether+nsh+ipv6+sctp and verify the detection message::

sendp([Ether(type=0x894f)/NSH(Len=0x6,NextProto=0x2,NSP=0x000002,NSI=0xff)/IPv6(nh=0x84)/SCTP(tag=1)/SCTPChunkData(“x” * 16)], iface=txItf)

L2 type: L2_ETHER_NSH L3 type: L3_IPV6_EXT_UNKNOWN L4 type: L4_SCTP