.. SPDX-License-Identifier: BSD-3-Clause Copyright(c) 2020 Intel Corporation ============================== ICE: IAVF Advanced RSS FOR ICE ============================== Description =========== IAVF Advanced RSS support Intel® Ethernet 800 Series nic with ice , throught create rule include related pattern and input-set to hash IP and ports domain, diversion the packets to the difference queues in VF. * inner header hash for tunnel packets, including comms package. * symmetric hash by rte_flow RSS action. * input set change by rte_flow RSS action. * For PFCP protocal, the destination port value of the outer UDP header is equal to 8805(0x2265). PFCP Node headers shall be identified when the Version field is equal to 001 and the S field is equal 0. PFCP Session headers shall be identified when the Version field is equal to 001 and the S field is equal 1. Intel® Ethernet 800 Series only support RSS hash for PFCP Session SEID value. * For L2TPv3 protocal, the IP proto id is equal to 115(0x73). Intel® Ethernet 800 Series only support RSS hash for L2TPv3 Session id value. * For ESP protocal, the IP proto id is equal to 50(0x32). Intel® Ethernet 800 Series only support RSS hash for ESP SPI value. * For AH protocal, the IP proto id is equal to 51(0x33). E810 series only support RSS hash for AH SPI value. * For NAT_T-ESP protocal, the destination port value of the outer UDP header is equal to 4500(0x1194). Intel® Ethernet 800 Series only support RSS hash for NAT_T-ESP SPI value. Pattern and input set --------------------- .. table:: +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | Default hash function: Non Symmetric_toeplitz | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | Packet Type | Pattern | All the Input Set options in combination | +===============================+===========================+==================================================================================+ | IPv4/IPv6 + TCP/UDP/SCTP | MAC_IPV4 | eth, l2-src-only, l2-dst-only, ipv4, l3-src-only, l3-dst-only | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_UDP | eth, l2-src-only, l2-dst-only, ipv4-udp, l3-src-only, l3-dst-only, | | | | l4-src-only, l4-dst-only, ipv4 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_TCP | eth, l2-src-only, l2-dst-only, ipv4-tcp, l3-src-only, l3-dst-only, | | | | l4-src-only, l4-dst-only, ipv4 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_SCTP | eth, l2-src-only, l2-dst-only, ipv4-sctp, l3-src-only, l3-dst-only, | | | | l4-src-only, l4-dst-only, ipv4 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6 | eth, l2-src-only, l2-dst-only, ipv6, l3-src-only, l3-dst-only | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_UDP | eth, l2-src-only, l2-dst-only, ipv6-udp, l3-src-only, l3-dst-only, | | | | l4-src-only, l4-dst-only, ipv6 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_TCP | eth, l2-src-only, l2-dst-only, ipv6-tcp, l3-src-only, l3-dst-only, | | | | l4-src-only, l4-dst-only, ipv6 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_SCTP | eth, l2-src-only, l2-dst-only, ipv6-sctp, l3-src-only, l3-dst-only, | | | | l4-src-only, l4-dst-only, ipv6 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | GTP-U data packet types | MAC_IPV4_GTPU_IPV4 | gtpu, ipv4, l3-src-only, l3-dst-only | | IPv4/IPv6 transport | | | | IPv4/IPv6 payload | | | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_IPV4_UDP | ipv4-udp, l3-src-only, l3-dst-only, l4-src-only, l4-dst-only, ipv4 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_IPV4_TCP | ipv4-tcp, l3-src-only, l3-dst-only, l4-src-only, l4-dst-only, ipv4 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_IPV6 | gtpu, ipv6, l3-src-only, l3-dst-only | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_IPV6_UDP | ipv6-udp, l3-src-only, l3-dst-only, l4-src-only, l4-dst-only, ipv6 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_IPV6_TCP | ipv6-tcp, l3-src-only, l3-dst-only, l4-src-only, l4-dst-only, ipv6 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_IPV4 | gtpu, ipv4, l3-src-only, l3-dst-only | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_IPV4_UDP | ipv4-udp, l3-src-only, l3-dst-only, l4-src-only, l4-dst-only, ipv4 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_IPV4_TCP | ipv4-tcp, l3-src-only, l3-dst-only, l4-src-only, l4-dst-only, ipv4 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_IPV6 | gtpu, ipv6, l3-src-only, l3-dst-only | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_IPV6_UDP | ipv6-udp, l3-src-only, l3-dst-only, l4-src-only, l4-dst-only, ipv6 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_IPV6_TCP | ipv6-tcp, l3-src-only, l3-dst-only, l4-src-only, l4-dst-only, ipv6 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_EH_IPV4 | ipv4, l3-src-only, l3-dst-only | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_EH_IPV4_UDP | ipv4-udp, l3-src-only, l3-dst-only, l4-src-only, l4-dst-only, ipv4 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_EH_IPV4_TCP | ipv4-tcp, l3-src-only, l3-dst-only, l4-src-only, l4-dst-only, ipv4 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_EH_IPV6 | ipv6, l3-src-only, l3-dst-only | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_EH_IPV6_UDP | ipv6-udp, l3-src-only, l3-dst-only, l4-src-only, l4-dst-only, ipv6 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_EH_IPV6_TCP | ipv6-tcp, l3-src-only, l3-dst-only, l4-src-only, l4-dst-only, ipv6 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_EH_IPV4 | ipv4, l3-src-only, l3-dst-only | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_EH_IPV4_UDP | ipv4-udp, l3-src-only, l3-dst-only, l4-src-only, l4-dst-only, ipv4 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_EH_IPV4_TCP | ipv4-tcp, l3-src-only, l3-dst-only, l4-src-only, l4-dst-only, ipv4 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_EH_IPV6 | ipv6, l3-src-only, l3-dst-only | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_EH_IPV6_UDP | ipv6-udp, l3-src-only, l3-dst-only, l4-src-only, l4-dst-only, ipv6 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_EH_IPV6_TCP | ipv6-tcp, l3-src-only, l3-dst-only, l4-src-only, l4-dst-only, ipv6 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | VLAN | MAC_VLAN_IPV4 | c-vlan | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_VLAN_IPV4_UDP_PAY | c-vlan | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_VLAN_IPV4_TCP_PAY | c-vlan | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_VLAN_IPV4_SCTP_PAY | c-vlan | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_VLAN_IPV6 | c-vlan | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_VLAN_IPV6_UDP_PAY | c-vlan | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_VLAN_IPV6_TCP_PAY | c-vlan | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_VLAN_IPV6_SCTP_PAY | c-vlan | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | ESP | MAC_IPV4_ESP | esp | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_UDP_ESP | esp | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_ESP | esp | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_UDP_ESP | esp | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | AH | MAC_IPV4_AH | ah | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_AH | ah | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | L2TP | MAC_IPV4_L2TP | l2tpv3 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_L2TP | l2tpv3 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | PFCP | MAC_IPV4_PFCP | pfcp | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_PFCP | pfcp | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | IPV4/IPV6+GRE+IPV4/IPV6 | MAC_IPV4_GRE_IPV4 | inner ipv4, inner l3-src-only, inner l3-dst-only | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GRE_IPV4 | inner ipv4, inner l3-src-only, inner l3-dst-only | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_GRE_IPV6 | inner ipv6, inner l3-src-only, inner l3-dst-only | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GRE_IPV6 | inner ipv6, inner l3-src-only, inner l3-dst-only | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | IPV4/IPV6+GRE+IPV4/IPV6+TCP | MAC_IPV4_GRE_IPV4_TCP | inner ipv4-tcp, inner l3-src-only, inner l3-dst-only, | | | | inner l4-src-only, inner l4-dst-only, inner ipv4 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GRE_IPV4_TCP | inner ipv4-tcp, inner l3-src-only, inner l3-dst-only, | | | | inner l4-src-only, inner l4-dst-only, inner ipv4 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_GRE_IPV6_TCP | inner ipv6-tcp, inner l3-src-only, inner l3-dst-only, | | | | inner l4-src-only, inner l4-dst-only, inner iv6 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GRE_IPV6_TCP | inner ipv6-tcp, inner l3-src-only, inner l3-dst-only, | | | | inner l4-src-only, inner l4-dst-only, inner ipv6 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | IPV4/IPV6+GRE+IPV4/IPV6+UDP | MAC_IPV4_GRE_IPV4_UDP | inner ipv4-udp, inner l3-src-only, inner l3-dst-only, | | | | inner l4-src-only, inner l4-dst-only, inner ipv4 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GRE_IPV4_UDP | inner ipv4-udp, inner l3-src-only, inner l3-dst-only, | | | | inner l4-src-only, inner l4-dst-only, inner ipv4 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV4_GRE_IPV6_UDP | inner ipv6-udp, inner l3-src-only, inner l3-dst-only, | | | | inner l4-src-only, inner l4-dst-only, inner ipv6 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ | | MAC_IPV6_GRE_IPV6_UDP | inner ipv6-udp, inner l3-src-only, inner l3-dst-only, | | | | inner l4-src-only, inner l4-dst-only, inner ipv6 | +-------------------------------+---------------------------+----------------------------------------------------------------------------------+ .. table:: +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | Hash function: Symmetric_toeplitz | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | Packet Type | Pattern | Input Set | +===============================+===========================+================================================================================+ | IPv4/IPv6 + TCP/UDP/SCTP | MAC_IPV4 | ipv4 | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV4_UDP | ipv4-udp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV4_TCP | ipv4-tcp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV4_SCTP | ipv4-sctp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6 | ipv6 | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_UDP | ipv6-udp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_TCP | ipv6-tcp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_SCTP | ipv6-sctp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | GTP-U data packet types | MAC_IPV4_GTPU_IPV4 | ipv4 | | IPv4/IPv6 transport | | | | IPv4/IPv6 payload | | | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_IPV4_UDP | ipv4-udp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_IPV4_TCP | ipv4-tcp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_IPV6 | ipv6 | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_IPV6_UDP | ipv6-udp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_IPV6_TCP | ipv6-tcp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_IPV4 | ipv4 | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_IPV4_UDP | ipv4-udp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_IPV4_TCP | ipv4-tcp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_IPV6 | ipv6 | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_IPV6_UDP | ipv6-udp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_IPV6_TCP | ipv6-tcp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_EH_IPV4 | ipv4 | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_EH_IPV4_UDP | ipv4-udp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_EH_IPV4_TCP | ipv4-tcp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_EH_IPV6 | ipv6 | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_EH_IPV6_UDP | ipv6-udp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV4_GTPU_EH_IPV6_TCP | ipv6-tcp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_EH_IPV4 | ipv4 | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_EH_IPV4_UDP | ipv4-udp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_EH_IPV4_TCP | ipv4-tcp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_EH_IPV6 | ipv6 | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_EH_IPV6_UDP | ipv6-udp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GTPU_EH_IPV6_TCP | ipv6-tcp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | IPV4/IPV6+GRE+IPV4/IPV6 | MAC_IPV4_GRE_IPV4 | inner ipv4 | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GRE_IPV4 | inner ipv4 | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV4_GRE_IPV6 | inner ipv6 | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GRE_IPV6 | inner ipv6 | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | IPV4/IPV6+GRE+IPV4/IPV6+TCP | MAC_IPV4_GRE_IPV4_TCP | inner ipv4-tcp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GRE_IPV4_TCP | inner ipv4-tcp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV4_GRE_IPV6_TCP | inner ipv6-tcp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GRE_IPV6_TCP | inner ipv6-tcp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | IPV4/IPV6+GRE+IPV4/IPV6+UDP | MAC_IPV4_GRE_IPV4_UDP | inner ipv4-udp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GRE_IPV4_UDP | inner ipv4-udp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV4_GRE_IPV6_UDP | inner ipv6-udp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ | | MAC_IPV6_GRE_IPV6_UDP | inner ipv6-udp | +-------------------------------+---------------------------+--------------------------------------------------------------------------------+ .. note:: This test plan only cover the packet type IPv4/IPv6 + TCP/UDP/SCTP, including toeplitz, symmetric. simple xor is not support in IAVF. Other packet types will be coverd in other test plans. Rules with src/dst mac addresses as hash input set can not be applied to tunnel packets. So in the test cases with input set src/dst mac addresses, matched packets do not include tunnel packets. For GRE tunnel rule,the input settings are for inner layer. Prerequisites ============= 1. Hardware: - Intel® Ethernet 810 Series: E810-XXVDA4/E810-CQ 2. Software: - dpdk: http://dpdk.org/git/dpdk - scapy: http://www.secdev.org/projects/scapy/ .. note:: This rss feature designed for Intel® Ethernet 800 Series NIC 25G and 100g, so below the case only support Intel® Ethernet 800 Series nic. 3. create a VF from a PF in DUT, set mac address for thi VF:: echo 1 > /sys/bus/pci/devices/0000\:18\:00.0/sriov_numvfs ip link set enp24s0f0 vf 0 mac 00:11:22:33:44:55 If test set HW csum flow rule does not impact RX checksum and TX checksum: ip link set enp24s0f0 vf 0 trust on ip link set enp24s0f0 vf 0 spoofchk off 4. bind the VF to dpdk driver in DUT:: modprobe vfio-pci usertools/dpdk-devbind.py --force --bind=vfio-pci 0000:18:01.0 .. note:: The kernel must be >= 3.6+ and VT-d must be enabled in bios. 5. Launch the testpmd to configuration queue of rx and tx number 16 in DUT:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xff -n 4 -a 0000:18:01.0 -- -i --rxq=16 --txq=16 testpmd>set fwd rxonly testpmd>set verbose 1 Default parameters ------------------ MAC:: [Src MAC]: 68:05:CA:BB:26:E0 [Dest MAC]: 00:11:22:33:44:55 [Multicast Dest MAC]: 11:22:33:44:55:66 .. note:: The LSB of the first byte "11" is 1, it says it to be multicast MAC address. IPv4:: [Dest IP]: 192.168.0.1 [Source IP]: 192.168.0.2 [Multicast Dest IPv4]: 224.0.0.1 IPv6:: [Source IPv6]: ABAB:910B:6666:3457:8295:3333:1800:2929 [Dest IPv6]: CDCD:910A:2222:5498:8475:1111:3900:2020 [Multicast Dest IPv6]: ff01::2 UDP/TCP/SCTP:: [Source Port]: 22 [Dest Port]: 23 toeplitz Test steps =================== all the test cases run the same test steps as below: 1. validate rule. 2. create rule and list rule. 3. send a basic hit pattern packet,record the hash value, check the packet is distributed to queues by RSS. 4. send hit pattern packet with changed input set in the rule. check the received packet have different hash value with basic packet. check the packet is distributed to queues by rss. 5. send hit pattern packet with changed input set not in the rule. check the received packet have same hash value with the basic packet. check the packet is distributed to queues by rss. note: if there is not this type packet in the case, omit this step. 6. destroy the rule and list rule. check the flow list has no rule. Test case: MAC_IPV4 =================== basic hit pattern packets are the same in this test case: ipv4-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_L2SRC ----------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / end actions rss types eth l2-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.0.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.3", src="192.168.0.5")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.3", src="192.168.0.5")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.3", src="192.168.0.5")/TCP(sport=19,dport=99)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_L2DST ----------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / end actions rss types eth l2-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: 3. hit pattern/not defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.3", src="192.168.0.5")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.3", src="192.168.0.5")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.3", src="192.168.0.5")/TCP(sport=19,dport=99)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_L2SRC_L2DST ----------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / end actions rss types eth end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.0.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.3", src="192.168.0.5")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.3", src="192.168.0.5")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.3", src="192.168.0.5")/TCP(sport=23,dport=25)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_L3SRC ----------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.1.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.1.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.1.2")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.1.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.1.1", src="192.168.0.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.1.1", src="192.168.0.2")/TCP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_L3DST ----------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.1.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.1.1", src="192.168.0.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.1.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.1.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.1.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.1.2")/TCP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_ALL --------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.1.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.1.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.1.1", src="192.168.0.2")/ICMP()/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.1.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.1.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.1.2")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.0.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.0.2")/TCP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Test case: MAC_IPV4_UDP ======================= basic hit pattern packets are the same in this test case. ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_UDP_L2SRC --------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types eth l2-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.3", src="192.168.0.5")/UDP(sport=25,dport=99)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_UDP_L2DST --------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types eth l2-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: 3. hit pattern/not defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.3", src="192.168.0.5")/UDP(sport=25,dport=99)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_UDP_L2SRC_L2DST --------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types eth end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.3", src="192.168.0.5")/UDP(sport=25,dport=99)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_UDP_L3SRC --------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.1.2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.1.1", src="192.168.0.2")/UDP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_UDP_L3DST --------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.1.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.1.2")/UDP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_UDP_L3SRC_L4SRC --------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-src-only l4-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.1.2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=32,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.1.1", src="192.168.0.2")/UDP(sport=22,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_UDP_L3SRC_L4DST --------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-src-only l4-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.1.2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=33)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.1.1", src="192.168.0.2")/UDP(sport=32,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_UDP_L3DST_L4SRC --------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only l4-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.1.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=32,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.1.2")/UDP(sport=22,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_UDP_L3DST_L4DST --------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only l4-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.1.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=33)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.1.2")/UDP(sport=32,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_UDP_L4SRC --------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l4-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=32,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.1.1", src="192.168.1.2")/UDP(sport=22,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_UDP_L4DST --------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l4-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=33)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.1.1", src="192.168.1.2")/UDP(sport=32,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_UDP_IPV4 -------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4 end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.1.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.1.2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_UDP_ALL ------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=33)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=32,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.1.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.1.2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") Test case: MAC_IPV4_TCP ======================= the rules and packets in this test case is similar to "Test case: MAC_IPV4_UDP" just change some parts of rules and packets: rule: change udp to tcp, change ipv4-udp to ipv4-tcp packets: if the packet's L4 layer is UDP, change it to TCP; if the packet's L4 layer is TCP, change it to UDP; if tunnel packet, change inner L4 layer from UDP to TCP; if tunnel packet, change inner L4 layer from TCP to UDP; Subcase: MAC_IPV4_TCP_L2SRC --------------------------- Subcase: MAC_IPV4_TCP_L2DST --------------------------- Subcase: MAC_IPV4_TCP_L2SRC_L2DST --------------------------------- Subcase: MAC_IPV4_TCP_L3SRC --------------------------- Subcase: MAC_IPV4_TCP_L3DST --------------------------- Subcase: MAC_IPV4_TCP_L3SRC_L4SRC --------------------------------- Subcase: MAC_IPV4_TCP_L3SRC_L4DST --------------------------------- Subcase: MAC_IPV4_TCP_L3DST_L4SRC --------------------------------- Subcase: MAC_IPV4_TCP_L3DST_L4DST --------------------------------- Subcase: MAC_IPV4_TCP_L4SRC --------------------------- Subcase: MAC_IPV4_TCP_L4DST --------------------------- Subcase: MAC_IPV4_TCP_IPV4 -------------------------- Subcase: MAC_IPV4_TCP_ALL ------------------------- Test case: MAC_IPV4_SCTP ======================== the rules and packets in this test case is similar to "Test case: MAC_IPV4_UDP" just change some parts of rules and packets: rule: change udp to sctp, change ipv4-udp to ipv4-sctp packets: if the packet's L4 layer is UDP, change it to SCTP; if tunnel packet, change inner L4 layer from UDP to SCTP; others can be not changed. Subcase: MAC_IPV4_SCTP_L2SRC ---------------------------- Subcase: MAC_IPV4_SCTP_L2DST ---------------------------- Subcase: MAC_IPV4_SCTP_L2SRC_L2DST ---------------------------------- Subcase: MAC_IPV4_SCTP_L3SRC ---------------------------- Subcase: MAC_IPV4_SCTP_L3DST ---------------------------- Subcase: MAC_IPV4_SCTP_L3SRC_L4SRC ---------------------------------- Subcase: MAC_IPV4_SCTP_L3SRC_L4DST ---------------------------------- Subcase: MAC_IPV4_SCTP_L3DST_L4SRC ---------------------------------- Subcase: MAC_IPV4_SCTP_L3DST_L4DST ---------------------------------- Subcase: MAC_IPV4_SCTP_L4SRC ---------------------------- Subcase: MAC_IPV4_SCTP_L4DST ---------------------------- Subcase: MAC_IPV4_SCTP_IPV4 --------------------------- Subcase: MAC_IPV4_SCTP_ALL -------------------------- Test case: MAC_IPV4 multicast ============================= Disable promisc mode in the testpmd:: testpmd> set promisc all off Enable all multicast mode in the testpmd:: testpmd> set allmulti all on configure multicast address:: testpmd> mcast_addr add 0 11:22:33:44:55:66 basic hit pattern packets are the same in this multicast test case: ipv4-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_L2SRC ----------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / end actions rss types eth l2-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/TCP(sport=19,dport=99)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_L2DST ----------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / end actions rss types eth l2-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:67", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="11:22:33:44:55:67", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="11:22:33:44:55:67", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/TCP(sport=19,dport=99)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.5")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.5")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.5")/TCP(sport=19,dport=99)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_L2SRC_L2DST ----------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / end actions rss types eth end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.2", src="192.168.0.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.2", src="192.168.0.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.2", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/TCP(sport=23,dport=25)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_L3SRC ----------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.1.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.1.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.1.2")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.2", src="192.168.0.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.2", src="192.168.0.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.2", src="192.168.0.2")/TCP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_L3DST ----------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.2.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.2.1", src="192.168.0.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.2.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.1.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.1.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.1.2")/TCP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_ALL --------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.2.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.1.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.2.1", src="192.168.0.2")/ICMP()/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.1.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.2.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.1.2")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.2")/TCP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Test case: MAC_IPV6 =================== basic hit pattern packets are the same in this test case: ipv6-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_L2SRC ----------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / end actions rss types eth l2-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/UDP(sport=25,dport=99)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_L2DST ----------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / end actions rss types eth l2-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: 3. hit pattern/not defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/UDP(sport=25,dport=99)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_L2SRC_L2DST ----------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / end actions rss types eth end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/UDP(sport=25,dport=99)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_L3SRC ----------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6 l3-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_L3DST ----------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6 l3-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_ALL --------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6 end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/ICMP()/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Test case: MAC_IPV6 multicast ============================= Disable promisc mode in the testpmd:: testpmd> set promisc all off Enable all multicast mode in the testpmd:: testpmd> set allmulti all on configure multicast address:: testpmd> mcast_addr add 0 11:22:33:44:55:66 basic hit pattern packets are the same in this test case, including unicast and multicast:: ipv6-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_L2SRC ----------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / end actions rss types eth l2-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/UDP(sport=25,dport=99)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_L2DST ----------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / end actions rss types eth l2-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:67", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="11:22:33:44:55:67", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="11:22:33:44:55:67", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/UDP(sport=25,dport=99)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/UDP(sport=25,dport=99)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_L2SRC_L2DST ----------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / end actions rss types eth end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::25")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::25")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::25")/UDP(sport=25,dport=99)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_L3SRC ----------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6 l3-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::2")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::25")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::25")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/UDP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_L3DST ----------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6 l3-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::25")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::25")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::25")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::2")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::2")/UDP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_ALL --------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6 end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::21")/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::2")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::21")/ICMP()/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::21")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/UDP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Test case: MAC_IPV6_64BIT_PREFIX ================================= basic hit pattern packets are the same in this test case: ipv6-64bit-prefix packets:: sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="fe81:1:a6bf:1ff:fe1c::806", dst="fe82:1:a6bf:1ff:fe1c::806")/Raw("x"*64)],iface="enp134s0f0") Subcase: MAC_IPV6_64BIT_PREFIX_L3SRC ------------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6 l3-pre64 l3-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-64bit-prefix packets:: sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="fe83:1:a6bf:2ff:fe1c::806", dst="fe82:1:a6bf:1ff:fe1c::806")/Raw("x"*64)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-64bit-prefix packets:: sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="fe81:1:a6bf:1ff:ee1c::806", dst="fe82:1:a6bf:1ff:fe1c::806")/Raw("x"*64)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="fe81:1:a6bf:1ff:ee1c::806", dst="fe82:1:a6bf:2ff:fe1c::806")/Raw("x"*64)],iface="enp134s0f0") 4. not hit pattern/not defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="fe81:1:a6bf:1ff:fe1c::806", dst="fe82:1:a6bf:1ff:fe1c::806")/UDP(sport=1234, dport=5678)/Raw("x"*64)],iface="enp134s0f0") Subcase: MAC_IPV6_64BIT_PREFIX_L3DST ------------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6 l3-pre64 l3-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-64bit-prefix packets:: sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="fe81:1:a6bf:1ff:fe1c::806", dst="fe83:1:a6bf:2ff:fe1c::806")/Raw("x"*64)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-64bit-prefix packets:: sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="fe81:1:a6bf:1ff:fe1c::806", dst="fe82:1:a6bf:1ff:ee1c::806")/Raw("x"*64)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="fe83:1:a6bf:1ff:fe1c::806", dst="fe82:1:a6bf:1ff:ee1c::806")/Raw("x"*64)],iface="enp134s0f0") 4. not hit pattern/not defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="fe81:1:a6bf:1ff:fe1c::806", dst="fe82:1:a6bf:1ff:fe1c::806")/UDP(sport=1234, dport=5678)/Raw("x"*64)],iface="enp134s0f0") Subcase: MAC_IPV6_64BIT_PREFIX_L3SRC_DST ----------------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6 l3-pre64 l3-src-only l3-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-64bit-prefix packets:: sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="fe81:1:a6bf:2ff:fe1c::806", dst="fe82:1:a6bf:1ff:fe1c::806")/Raw("x"*64)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-64bit-prefix packets:: sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="fe81:1:a6bf:1ff:fe1c::806", dst="fe82:1:a6bf:2ff:fe1c::806")/Raw("x"*64)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="fe81:1:a6bf:1ff:ee1c::806", dst="fe82:1:a6bf:1ff:ee1c::806")/Raw("x"*64)],iface="enp134s0f0") 4. not hit pattern/not defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="fe81:1:a6bf:1ff:fe1c::806", dst="fe82:1:a6bf:1ff:fe1c::806")/UDP(sport=1234, dport=5678)/Raw("x"*64)],iface="enp134s0f0") Test case: MAC_IPV6_UDP ======================= basic hit pattern packets are the same in this test case: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_UDP_L2SRC --------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types eth l2-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/UDP(sport=25,dport=99)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_UDP_L2DST --------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types eth l2-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: 3. hit pattern/not defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/UDP(sport=25,dport=99)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_UDP_L2SRC_L2DST --------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types eth end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/UDP(sport=25,dport=99)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_UDP_L3SRC --------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_UDP_L3DST --------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_UDP_L3SRC_L4SRC --------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-src-only l4-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=32,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=22,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_UDP_L3SRC_L4DST --------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-src-only l4-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=33)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=32,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_UDP_L3DST_L4SRC --------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only l4-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=32,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_UDP_L3DST_L4DST --------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only l4-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=22,dport=33)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=32,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_UDP_L4SRC --------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l4-src-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=32,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=22,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_UDP_L4DST --------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l4-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=33)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=32,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_UDP_IPV6 -------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6 end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV6_UDP_ALL ------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=32,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=33)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") Test case: MAC_IPV6_TCP ======================= the rules and packets in this test case is similar to "Test case: MAC_IPV6_UDP" just change some parts of rules and packets: rule: change udp to tcp, change ipv6-udp to ipv6-tcp packets: if the packet's L4 layer is UDP, change it to TCP; if the packet's L4 layer is TCP, change it to UDP; if tunnel packet, change inner L4 layer from UDP to TCP; if tunnel packet, change inner L4 layer from TCP to UDP; Subcase: MAC_IPV6_TCP_L2SRC --------------------------- Subcase: MAC_IPV6_TCP_L2DST --------------------------- Subcase: MAC_IPV6_TCP_L2SRC_L2DST --------------------------------- Subcase: MAC_IPV6_TCP_L3SRC --------------------------- Subcase: MAC_IPV6_TCP_L3DST --------------------------- Subcase: MAC_IPV6_TCP_L3SRC_L4SRC --------------------------------- Subcase: MAC_IPV6_TCP_L3SRC_L4DST --------------------------------- Subcase: MAC_IPV6_TCP_L3DST_L4SRC --------------------------------- Subcase: MAC_IPV6_TCP_L3DST_L4DST --------------------------------- Subcase: MAC_IPV6_TCP_L4SRC --------------------------- Subcase: MAC_IPV6_TCP_L4DST --------------------------- Subcase: MAC_IPV6_TCP_IPV6 -------------------------- Subcase: MAC_IPV6_TCP_ALL ------------------------- Test case: MAC_IPV6_SCTP ======================== the rules and packets in this test case is similar to "Test case: MAC_IPV6_UDP" just change some parts of rules and packets: rule: change udp to sctp, change ipv6-udp to ipv6-sctp packets: if the packet's L4 layer is UDP, change it to SCTP; if tunnel packet, change inner L4 layer from UDP to SCTP; others can be not changed. Subcase: MAC_IPV6_SCTP_L2SRC ---------------------------- Subcase: MAC_IPV6_SCTP_L2DST ---------------------------- Subcase: MAC_IPV6_SCTP_L2SRC_L2DST ---------------------------------- Subcase: MAC_IPV6_SCTP_L3SRC ---------------------------- Subcase: MAC_IPV6_SCTP_L3DST ---------------------------- Subcase: MAC_IPV6_SCTP_L3SRC_L4SRC ---------------------------------- Subcase: MAC_IPV6_SCTP_L3SRC_L4DST ---------------------------------- Subcase: MAC_IPV6_SCTP_L3DST_L4SRC ---------------------------------- Subcase: MAC_IPV6_SCTP_L3DST_L4DST ---------------------------------- Subcase: MAC_IPV6_SCTP_L4SRC ---------------------------- Subcase: MAC_IPV6_SCTP_L4DST ---------------------------- Subcase: MAC_IPV6_SCTP_IPV6 --------------------------- Subcase: MAC_IPV6_SCTP_ALL -------------------------- GRE Tunnel Case Test steps ========================== all the test cases run the same test steps as below: 1. validate rule. 2. create rule and list rule. 3. send a basic hit pattern packet,record the hash value, check the packet is distributed to queues by RSS. 4. send hit pattern packet with changed input set in the rule. check the received packet have different hash value with basic packet. check the packet is distributed to queues by rss. 5. send hit pattern packet with changed input set not in the rule. check the received packet have same hash value with the basic packet. check the packet is distributed to queues by rss. 6. destroy the rule and list rule. check the flow list has no rule. Test case: MAC_IPV4_GRE_IPV4 ============================ basic hit pattern packets are the same in this test case: ipv4-proto packets:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2, proto=6")/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV4_L3SRC -------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.1.2", proto=6)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.1.1", src="192.168.0.2", proto=6)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV4_L3DST -------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.1.1", src="192.168.0.2", proto=6)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.1.2", proto=6)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV4_ALL ------------------------------ 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.1.1", src="192.168.0.2", proto=6)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.1.2", proto=6)/("X"*480)],iface="enp134s0f0") Test case: MAC_IPV6_GRE_IPV4 ============================ Subcase 1: MAC_IPV6_GRE_IPV4_L3SRC ---------------------------------- Subcase 2: MAC_IPV6_GRE_IPV4_L3DST ---------------------------------- Subcase 3: MAC_IPV6_GRE_IPV4_L4SRC ---------------------------------- Subcase 4: MAC_IPV6_GRE_IPV4_L4DST ---------------------------------- Subcase 5: MAC_IPV6_GRE_IPV4_ALL -------------------------------- each subcase is the same as the subcase of Test case: MAC_IPV4_GRE_IPV4, just only pattern is different, replace it with 'eth / ipv6 / gre / ipv4' Test case: MAC_IPV4_GRE_IPV6 ============================ basic hit pattern packets are the same in this test case: ipv6-nh packets:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV6_L3SRC -------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / end actions rss types ipv6 l3-src-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2930",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021", nh=6)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV6_L3DST -------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / end actions rss types ipv6 l3-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021", nh=6)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2930",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV6_ALL ------------------------------ 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / end actions rss types ipv6 end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021", nh=6)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2930",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/("X"*480)],iface="enp134s0f0") Test case: MAC_IPV6_GRE_IPV6 ============================ Subcase 1: MAC_IPV6_GRE_IPV4_L3SRC ---------------------------------- Subcase 2: MAC_IPV6_GRE_IPV4_L3DST ---------------------------------- Subcase 3: MAC_IPV6_GRE_IPV4_L4SRC ---------------------------------- Subcase 4: MAC_IPV6_GRE_IPV4_L4DST ---------------------------------- Subcase 5: MAC_IPV6_GRE_IPV4_ALL -------------------------------- each subcase is the same as the subcase of Test case: MAC_IPV4_GRE_IPV6, just only pattern is different, replace it with 'eth / ipv6 / gre / ipv6' Test case: MAC_IPV4_GRE_IPV4_TCP ================================ basic hit pattern packets are the same in this test case: ipv4-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2, proto=6")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV4_TCP_L3SRC ------------------------------------ 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.1.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.1.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV4_TCP_L3DST ------------------------------------ 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.1.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.1.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV4_TCP_L4SRC ------------------------------------ 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / tcp / end actions rss types ipv4-tcp l4-src-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.1.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.1.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV4_TCP_L4DST ------------------------------------ 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / tcp / end actions rss types ipv4-tcp l4-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.1.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.1.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV4_TCP_L3SRC_L4SRC ------------------------------------------ 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l4-src-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.1.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.1.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV4_TCP_L3SRC_L4DST ------------------------------------------ 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l4-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.1.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.1.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV4_TCP_L3DST_L4SRC ------------------------------------------ 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only l4-src-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.1.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.1.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV4_TCP_L3DST_L4DST ------------------------------------------ 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only l4-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.1.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.1.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV4_TCP_ALL ---------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / tcp / end actions rss types ipv4-tcp end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.1.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.1.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV4_TCP_IPV4 ----------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / tcp / end actions rss types ipv4 end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.1.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.1.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") Test case: MAC_IPV6_GRE_IPV4_TCP ================================ Subcase: MAC_IPV6_GRE_IPV4_TCP_L3SRC ------------------------------------ Subcase: MAC_IPV6_GRE_IPV4_TCP_L3DST ------------------------------------ Subcase: MAC_IPV6_GRE_IPV4_TCP_L4SRC ------------------------------------ Subcase: MAC_IPV6_GRE_IPV4_TCP_L4DST ------------------------------------ Subcase: MAC_IPV6_GRE_IPV4_TCP_L3SRC_L4SRC ------------------------------------------ Subcase: MAC_IPV6_GRE_IPV4_TCP_L3SRC_L4DST ------------------------------------------ Subcase: MAC_IPV6_GRE_IPV4_TCP_L3DST_L4SRC ------------------------------------------ Subcase: MAC_IPV6_GRE_IPV4_TCP_L3DST_L4DST ------------------------------------------ Subcase: MAC_IPV6_GRE_IPV4_TCP_ALL ---------------------------------- Subcase: MAC_IPV6_GRE_IPV4_TCP_IPV4 ----------------------------------- each subcase is the same as the subcase of Test case: MAC_IPV4_GRE_IPV4_TCP, just only pattern is different, replace it with 'eth / ipv6 / gre / ipv4' Test case: MAC_IPV4_GRE_IPV6_TCP ================================ basic hit pattern packets are the same in this test case: ipv6-nh packets:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV6_TCP_L3SRC ------------------------------------ 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / tcp / end actions rss types ipv6-tcp l3-src-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2930",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV6_TCP_L3DST ------------------------------------ 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / tcp / end actions rss types ipv6-tcp l3-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2930",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV6_TCP_L4SRC ------------------------------------ 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / tcp / end actions rss types ipv6-tcp l4-src-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2930",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV6_TCP_L4DST ------------------------------------ 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / tcp / end actions rss types ipv6-tcp l4-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2930",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV6_TCP_L3SRC_L4SRC ------------------------------------------ 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / tcp / end actions rss types ipv6-tcp l3-src-only l4-src-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2930",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV6_TCP_L3SRC_L4DST ------------------------------------------ 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / tcp / end actions rss types ipv6-tcp l3-src-only l4-dst-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2930",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV6_TCP_L3DST_L4SRC ------------------------------------------ 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / tcp / end actions rss types ipv6-tcp l3-dst-only l4-src-only end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2930",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV6_TCP_ALL ---------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / tcp / end actions rss types ipv6-tcp end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2930",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") Subcase: MAC_IPV4_GRE_IPV6_TCP_IPV6 ----------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / tcp / end actions rss types ipv6 end key_len 0 queues end / end 2. hit pattern/defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2930",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. hit pattern/not defined input set:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=21,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=24)/("X"*480)],iface="enp134s0f0") Test case: MAC_IPV6_GRE_IPV6_TCP ================================ Subcase: MAC_IPV6_GRE_IPV6_TCP_L3SRC ------------------------------------ Subcase: MAC_IPV6_GRE_IPV6_TCP_L3DST ------------------------------------ Subcase: MAC_IPV6_GRE_IPV6_TCP_L4SRC ------------------------------------ Subcase: MAC_IPV6_GRE_IPV6_TCP_L4DST ------------------------------------ Subcase: MAC_IPV6_GRE_IPV6_TCP_L3SRC_L4SRC ------------------------------------------ Subcase: MAC_IPV6_GRE_IPV6_TCP_L3SRC_L4DST ------------------------------------------ Subcase: MAC_IPV6_GRE_IPV6_TCP_L3DST_L4SRC ------------------------------------------ Subcase: MAC_IPV6_GRE_IPV6_TCP_L3DST_L4DST ------------------------------------------ Subcase: MAC_IPV6_GRE_IPV6_TCP_ALL ---------------------------------- Subcase: MAC_IPV6_GRE_IPV6_TCP_IPV6 ----------------------------------- each subcase is the same as the subcase of Test case: MAC_IPV4_GRE_IPV6_TCP, just only pattern is different, replace it with 'eth / ipv6 / gre / ipv6' Test case: MAC_IPV4_GRE_IPV4_UDP ================================ Subcase: MAC_IPV4_GRE_IPV4_UDP_L3SRC ------------------------------------ Subcase: MAC_IPV4_GRE_IPV4_UDP_L3DST ------------------------------------ Subcase: MAC_IPV4_GRE_IPV4_UDP_L4SRC ------------------------------------ Subcase: MAC_IPV4_GRE_IPV4_UDP_L4DST ------------------------------------ Subcase: MAC_IPV4_GRE_IPV4_UDP_L3SRC_L4SRC ------------------------------------------ Subcase: MAC_IPV4_GRE_IPV4_UDP_L3SRC_L4DST ------------------------------------------ Subcase: MAC_IPV4_GRE_IPV4_UDP_L3DST_L4SRC ------------------------------------------ Subcase: MAC_IPV4_GRE_IPV4_UDP_L3DST_L4DST ------------------------------------------ Subcase: MAC_IPV4_GRE_IPV4_UDP_ALL ---------------------------------- Subcase: MAC_IPV4_GRE_IPV4_UDP_IPV4 ----------------------------------- each subcase is the same as the subcase of Test case: MAC_IPV4_GRE_IPV4_TCP, just only pattern is different, replace "tcp" with "udp" in all the subcases Test case: MAC_IPV4_GRE_IPV6_UDP ================================ Subcase: MAC_IPV4_GRE_IPV6_UDP_L3SRC ------------------------------------ Subcase: MAC_IPV4_GRE_IPV6_UDP_L3DST ------------------------------------ Subcase: MAC_IPV4_GRE_IPV6_UDP_L4SRC ------------------------------------ Subcase: MAC_IPV4_GRE_IPV6_UDP_L4DST ------------------------------------ Subcase: MAC_IPV4_GRE_IPV6_UDP_L3SRC_L4SRC ------------------------------------------ Subcase: MAC_IPV4_GRE_IPV6_UDP_L3SRC_L4DST ------------------------------------------ Subcase: MAC_IPV4_GRE_IPV6_UDP_L3DST_L4SRC ------------------------------------------ Subcase: MAC_IPV4_GRE_IPV6_UDP_L3DST_L4DST ------------------------------------------ Subcase: MAC_IPV4_GRE_IPV6_UDP_ALL ---------------------------------- Subcase: MAC_IPV4_GRE_IPV6_UDP_IPV6 ----------------------------------- each subcase is the same as the subcase of Test case: MAC_IPV4_GRE_IPV6_TCP, just only pattern is different, replace "tcp" with "udp" in all the subcases Test case: MAC_IPV6_GRE_IPV4_UDP ================================ Subcase: MAC_IPV6_GRE_IPV4_UDP_L3SRC ------------------------------------ Subcase: MAC_IPV6_GRE_IPV4_UDP_L3DST ------------------------------------ Subcase: MAC_IPV6_GRE_IPV4_UDP_L4SRC ------------------------------------ Subcase: MAC_IPV6_GRE_IPV4_UDP_L4DST ------------------------------------ Subcase: MAC_IPV6_GRE_IPV4_UDP_L3SRC_L4SRC ------------------------------------------ Subcase: MAC_IPV6_GRE_IPV4_UDP_L3SRC_L4DST ------------------------------------------ Subcase: MAC_IPV6_GRE_IPV4_UDP_L3DST_L4SRC ------------------------------------------ Subcase: MAC_IPV6_GRE_IPV4_UDP_L3DST_L4DST ------------------------------------------ Subcase: MAC_IPV6_GRE_IPV4_UDP_ALL ---------------------------------- Subcase: MAC_IPV6_GRE_IPV4_UDP_IPV4 ----------------------------------- each subcase is the same as the subcase of Test case: MAC_IPV6_GRE_IPV4_TCP, just only pattern is different, replace "tcp" with "udp" in all the subcases Test case: MAC_IPV6_GRE_IPV6_UDP ================================ Subcase: MAC_IPV6_GRE_IPV6_UDP_L3SRC ------------------------------------ Subcase: MAC_IPV6_GRE_IPV6_UDP_L3DST ------------------------------------ Subcase: MAC_IPV6_GRE_IPV6_UDP_L4SRC ------------------------------------ Subcase: MAC_IPV6_GRE_IPV6_UDP_L4DST ------------------------------------ Subcase: MAC_IPV6_GRE_IPV6_UDP_L3SRC_L4SRC ------------------------------------------ Subcase: MAC_IPV6_GRE_IPV6_UDP_L3SRC_L4DST ------------------------------------------ Subcase: MAC_IPV6_GRE_IPV6_UDP_L3DST_L4SRC ------------------------------------------ Subcase: MAC_IPV6_GRE_IPV6_UDP_L3DST_L4DST ------------------------------------------ Subcase: MAC_IPV6_GRE_IPV6_UDP_ALL ---------------------------------- Subcase: MAC_IPV6_GRE_IPV6_UDP_IPV6 ----------------------------------- each subcase is the same as the subcase of Test case: MAC_IPV6_GRE_IPV6_TCP, just only pattern is different, replace "tcp" with "udp" in all the subcases GRE Tunnel symmetric-toeplitz Test steps ======================================== 1. validate rule. 2. create rule and list rule. 3. send hit pattern packets with switched value of input set in the rule. check the received packets have same hash value. check all the packets are distributed to queues by rss. Test case: symmetric MAC_IPV4_GRE_IPV4 ====================================== 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end 2. hit pattern with switched value of input set in the rule:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.2", src="192.168.0.1", proto=6)/("X"*480)],iface="enp134s0f0") Test case: symmetric MAC_IPV6_GRE_IPV4 ====================================== 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / gre / ipv4 / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end 2. hit pattern with switched value of input set in the rule:: sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP(dst="192.168.0.2", src="192.168.0.1", proto=6)/("X"*480)],iface="enp134s0f0") Test case: symmetric MAC_IPV4_GRE_IPV6 ====================================== 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / end actions rss func symmetric_toeplitz types ipv6 end key_len 0 queues end / end 2. hit pattern with switched value of input set in the rule:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2020",dst="CDCD:910A:2222:5498:8475:1111:3900:2929", nh=6)/("X"*480)],iface="enp134s0f0") Test case: symmetric MAC_IPV6_GRE_IPV6 ====================================== 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / gre / ipv6 / end actions rss func symmetric_toeplitz types ipv6 end key_len 0 queues end / end 2. hit pattern with switched value of input set in the rule:: sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2020",dst="CDCD:910A:2222:5498:8475:1111:3900:2929", nh=6)/("X"*480)],iface="enp134s0f0") Test case: symmetric MAC_IPV4_GRE_IPV4_TCP ========================================== 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv4-tcp end key_len 0 queues end / end 2. hit pattern with switched value of input set in the rule:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.2", src="192.168.0.1", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=23,dport=22)/("X"*480)],iface="enp134s0f0") Test case: symmetric MAC_IPV6_GRE_IPV4_TCP ========================================== 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / gre / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv4-tcp end key_len 0 queues end / end 2. hit pattern with switched value of input set in the rule:: sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP(dst="192.168.0.2", src="192.168.0.1", proto=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP(dst="192.168.0.1", src="192.168.0.2", proto=6)/TCP(sport=23,dport=22)/("X"*480)],iface="enp134s0f0") Test case: symmetric MAC_IPV4_GRE_IPV6_TCP ========================================== 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / tcp / end actions rss func symmetric_toeplitz types ipv6-tcp end key_len 0 queues end / end 2. hit pattern with switched value of input set in the rule:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2020",dst="CDCD:910A:2222:5498:8475:1111:3900:2929", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=23,dport=22)/("X"*480)],iface="enp134s0f0") Test case: symmetric MAC_IPV6_GRE_IPV6_TCP ========================================== 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / gre / ipv6 / tcp / end actions rss func symmetric_toeplitz types ipv6-tcp end key_len 0 queues end / end 2. hit pattern with switched value of input set in the rule:: sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2020",dst="CDCD:910A:2222:5498:8475:1111:3900:2929", nh=6)/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/TCP(sport=23,dport=22)/("X"*480)],iface="enp134s0f0") Test case: symmetric MAC_IPV4_GRE_IPV4_UDP ========================================== test steps same as Test case: symmetric MAC_IPV4_GRE_IPV4_TCP, just only pattern is different, replace "tcp" with "udp" Test case: symmetric MAC_IPV6_GRE_IPV4_UDP ========================================== test steps same as Test case: symmetric MAC_IPV6_GRE_IPV4_TCP, just only pattern is different, replace "tcp" with "udp" Test case: symmetric MAC_IPV4_GRE_IPV6_UDP ========================================== test steps same as Test case: symmetric MAC_IPV4_GRE_IPV6_TCP, just only pattern is different, replace "tcp" with "udp" Test case: symmetric MAC_IPV6_GRE_IPV6_UDP ========================================== test steps same as Test case: symmetric MAC_IPV6_GRE_IPV6_TCP, just only pattern is different, replace "tcp" with "udp" symmetric-toeplitz Test steps ============================= all the test cases run the same test steps as below: 1. validate rule. 2. send hit pattern packets with switched value of input set in the rule. check the received packets have different hash value. check all the packets are distributed to queues by rss. 3. create rule and list rule. 4. send same packets with step 2. check the received packets have the same hash value. check all the packets are distributed to queues by rss. 5. send not hit pattern packets with switched value of input set in the rule. check the received packets have different hash value. check all the packets are distributed to queues by rss. note: if there is not this type packet in the case, omit this step. 6. destroy the rule and list rule. 7. send same packets with step 2. check the received packets have different hash value. Test case: symmetric MAC_IPV4 ============================= 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.2", src="192.168.0.1")/("X"*480)],iface="enp134s0f0") ipv4-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/ICMP()/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.2", src="192.168.0.1")/ICMP()/("X"*480)],iface="enp134s0f0") ipv4-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.2", src="192.168.0.1")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. not hit pattern with switched value of input set in the rule: ipv6-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2928",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)],iface="enp134s0f0") Test case: symmetric MAC_IPV4_UDP ================================= 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss func symmetric_toeplitz types ipv4-udp end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.2", src="192.168.0.1")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=23,dport=22)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.2", src="192.168.0.1")/UDP(sport=23,dport=22)/("X"*480)],iface="enp134s0f0") 3. not hit pattern/not defined input set packets:: ipv4-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.2", src="192.168.0.1")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") Test case: symmetric MAC_IPV4_TCP ================================= 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv4-tcp end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.2", src="192.168.0.1")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/TCP(sport=23,dport=22)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.2", src="192.168.0.1")/TCP(sport=23,dport=22)/("X"*480)],iface="enp134s0f0") 3. not hit pattern/not defined input set packets:: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.2", src="192.168.0.1")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") Test case: symmetric MAC_IPV4_SCTP ================================== 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss func symmetric_toeplitz types ipv4-sctp end key_len 0 queues end / end 2. hit pattern/defined input set: ipv4-sctp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/SCTP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.2", src="192.168.0.1")/SCTP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/SCTP(sport=23,dport=22)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.2", src="192.168.0.1")/SCTP(sport=23,dport=22)/("X"*480)],iface="enp134s0f0") 3. not hit pattern/not defined input set packets:: ipv4-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.2", src="192.168.0.1")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") Test case: symmetric MAC_IPV6 ============================= 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / end actions rss func symmetric_toeplitz types ipv6 end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)],iface="enp134s0f0") ipv6-icmp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/ICMP()/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/ICMP()/("X"*480)],iface="enp134s0f0") ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. not hit pattern with switched value of input set in the rule: ipv4-nonfrag packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IP(dst="192.168.0.2", src="192.168.0.1")/("X"*480)],iface="enp134s0f0") Test case: symmetric MAC_IPV6_UDP ================================= 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / udp / end actions rss func symmetric_toeplitz types ipv6-udp end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. not hit pattern/not defined input set packets:: ipv6-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") Test case: symmetric MAC_IPV6_TCP ================================= 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss func symmetric_toeplitz types ipv6-tcp end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-tcp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. not hit pattern/not defined input set packets:: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") Test case: symmetric MAC_IPV6_SCTP ================================== 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss func symmetric_toeplitz types ipv6-sctp end key_len 0 queues end / end 2. hit pattern/defined input set: ipv6-sctp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/SCTP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/SCTP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") 3. not hit pattern/not defined input set packets:: ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E0")/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)],iface="enp134s0f0") Test Case: negative case ======================== 1. create rules with invalid input set:: testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types eth l3-src-only end key_len 0 queues end / end ice_flow_create(): Failed to create flow port_flow_complain(): Caught PMD error type 10 (item specification): cause: 0x7fff3b61eb08, Invalid input set: Invalid argument testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-udp end key_len 0 queues end / end ice_flow_create(): Failed to create flow port_flow_complain(): Caught PMD error type 10 (item specification): cause: 0x7fff3b61eb08, Invalid input set: Invalid argument testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-tcp end key_len 0 queues end / end ice_flow_create(): Failed to create flow port_flow_complain(): Caught PMD error type 10 (item specification): cause: 0x7fff3b61eb08, Invalid input set: Invalid argument testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv6 end key_len 0 queues end / end ice_flow_create(): Failed to create flow port_flow_complain(): Caught PMD error type 10 (item specification): cause: 0x7fff3b61eb08, Invalid input set: Invalid argument testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss func symmetric_toeplitz types ipv4 l3-src-only end key_len 0 queues end / end ice_flow_create(): Failed to create flow port_flow_complain(): Caught PMD error type 10 (item specification): cause: 0x7fff3b61eb08, Invalid input set: Invalid argument check all the rule failed to be created. Test Case: multirules test ========================== Subcase 1: two rules with same pattern but different hash input set, not hit default profile -------------------------------------------------------------------------------------------- 1. create a MAC_IPV4_UDP_L3_SRC_ONLY rule:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-src-only end key_len 0 queues end / end testpmd> flow list 0 check the rule exists in the list. 2. send a MAC_IPV4_UDP packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(dport=45)/Raw("x"*480)], iface="enp134s0f0") change the field [Source IP], send a packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.7",dst="192.168.0.5")/UDP(dport=45)/Raw("x"*480)], iface="enp134s0f0") check the hash value is different from the first packet. 3. create a rule with same pattern but different hash input set:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only end key_len 0 queues end / end testpmd> flow list 0 check the rule exists in the list. 4. send a MAC_IPV4_UDP packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(dport=45)/Raw("x"*480)], iface="enp134s0f0") change the field [Source IP], send a packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.7",dst="192.168.0.5")/UDP(dport=45)/Raw("x"*480)], iface="enp134s0f0") check the hash value is the same as the first packet. change the field [Dest IP], send a packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.7")/UDP(dport=45)/Raw("x"*480)], iface="enp134s0f0") check the hash value is different from the first packet. Subcase 2: two rules with same pattern but different hash input set, hit default profile ---------------------------------------------------------------------------------------- 1. create a MAC_IPV4_PAY_L3_SRC_ONLY rule:: testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end testpmd> flow list 0 check the rule exists in the list. 2. send a MAC_IPV4_PAY packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/Raw("x"*480)], iface="enp134s0f0") change the field [Source IP], send a packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.7",dst="192.168.0.5")/Raw("x"*480)], iface="enp134s0f0") check the hash value is different from the first packet. change the field [Dest IP], send a packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.8")/Raw("x"*480)], iface="enp134s0f0") check the hash value is the same as the first packet. 3. create a rule with same pattern but different hash input set:: testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end testpmd> flow list 0 check the rule exists in the list. 4. send a MAC_IPV4_PAY packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/Raw("x"*480)], iface="enp134s0f0") change the field [Source IP], send a packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.7",dst="192.168.0.5")/Raw("x"*480)], iface="enp134s0f0") check the hash value is the same as the first packet. change the field [Dst IP], send a packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.7")/Raw("x"*480)], iface="enp134s0f0") check the hash value is different from the first packet. Subcase 3: two rules, scope smaller created first, and the larger one created later ----------------------------------------------------------------------------------- 1. create a MAC_IPV4_UDP_PAY_L4_SRC_ONLY rule:: testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l4-src-only end key_len 0 queues end / end testpmd> flow list 0 check the rule exists in the list. 2. send a MAC_IPV4_UDP_PAY packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(sport=23, dport=45)/Raw("x"*480)], iface="enp134s0f0") change the field [Source Port], send a packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(sport=25, dport=45)/Raw("x"*480)], iface="enp134s0f0") check the hash value is different from the first packet. change other fields, send a packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.7",dst="192.168.0.8")/UDP(sport=23, dport=44)/Raw("x"*480)], iface="enp134s0f0") check the hash value is the same as the first packet. 3. create a MAC_IPV4_PAY_L3_SRC_ONLY rule:: testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end testpmd> flow list 0 check the rule exists in the list. 4. send a MAC_IPV4_UDP_PAY packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(sport=23, dport=45)/Raw("x"*480)], iface="enp134s0f0") change the field [Source IP], send a packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.7",dst="192.168.0.5")/UDP(sport=23, dport=45)/Raw("x"*480)], iface="enp134s0f0") check the hash value is different from the first packet. change other fields, send a packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.8")/UDP(sport=25, dport=99)/Raw("x"*480)], iface="enp134s0f0") check the hash value is the same as the first packet. Subcase 4: two rules, scope larger created first, and the smaller one created later ----------------------------------------------------------------------------------- 1. create a MAC_IPV4_PAY_L3_SRC_ONLY rule:: testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end testpmd> flow list 0 check the rule exists in the list. 2. send a MAC_IPV4_UDP_PAY packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(sport=23, dport=45)/Raw("x"*480)], iface="enp134s0f0") change the field [Source IP], send a packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.7",dst="192.168.0.5")/UDP(sport=23, dport=45)/Raw("x"*480)], iface="enp134s0f0") check the hash value is different from the first packet. change other fields, send a packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.8")/UDP(sport=25, dport=99)/Raw("x"*480)], iface="enp134s0f0") check the hash value is the same as the first packet. 3. create a MAC_IPV4_UDP_PAY_L3_SRC_ONLY rule:: testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l4-src-only end key_len 0 queues end / end testpmd> flow list 0 check the rule exists in the list. 4. send a MAC_IPV4_UDP_PAY packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(sport=23, dport=45)/Raw("x"*480)], iface="enp134s0f0") change the field [Source Port], send a packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(sport=25, dport=45)/Raw("x"*480)], iface="enp134s0f0") check the hash value is different from the first packet. change other fields, send a packet:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.7",dst="192.168.0.8")/UDP(sport=23, dport=44)/Raw("x"*480)], iface="enp134s0f0") check the hash value is the same as the first packet. Test case: MAC_IPV4_IPV4_CHKSUM =============================== 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-chksum end queues end / end 2. basic hit pattern packet:: p1=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1",dst="192.168.0.2",chksum=0x1)/ ("X"*48) 3. hit pattern/changed defined input set:: p2=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1",dst="192.168.0.2",chksum=0xffff)/ ("X"*48) 4. hit pattern/changed not defined input set:: p3=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:01")/IP(src="192.168.1.1",dst="192.168.1.2",chksum=0x1)/ ("X"*48) Test case: MAC_IPV4_UDP_CHKSUM ============================== Subcase 1: MAC_IPV4_UDP_L4_CHKSUM --------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types l4-chksum end queues end / end 2. basic hit pattern packet:: p1=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1",dst="192.168.0.2")/UDP(sport=22, dport=23,chksum=0xffff)/("X"*48) 3. hit pattern/changed defined input set:: p2=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1",dst="192.168.0.2")/UDP(sport=22, dport=23,chksum=0xfffe)/("X"*48) 4. hit pattern/changed not defined input set:: p3=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:01")/IP(src="192.168.1.1", dst="192.168.1.2",chksum=0x3)/UDP(sport=32, dport=33,chksum=0xffff)/("X"*48) Subcase 2: MAC_IPV4_UDP_IPV4_CHKSUM ----------------------------------- 1. create rss rule:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-chksum end queues end / end 2. basic hit pattern packet:: p1=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1",dst="192.168.0.2",chksum=0xffff)/UDP(sport=22, dport=23)/("X"*48) 3. hit pattern/changed defined input set:: p2=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1",dst="192.168.0.2",chksum=0xfffe)/UDP(sport=22, dport=23)/("X"*48) 4. hit pattern/changed not defined input set:: p3=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:01")/IP(src="192.168.1.1", dst="192.168.1.2",chksum=0xffff)/UDP(sport=32, dport=33,chksum=0xffff)/("X"*48) Test case: MAC_IPV4_TCP_CHKSUM ============================== The rules and packets in this test case is similar to "Test case: MAC_IPV4_UDP_CHKSUM", just change some parts of rules and packets: rule: change udp to tcp packets: if the packet's L4 layer is UDP, change it to TCP; if the packet's L4 layer is TCP, change it to UDP; Subcase 1: MAC_IPV4_TCP_L4_CHKSUM --------------------------------- Subcase 2: MAC_IPV4_TCP_IPV4_CHKSUM ----------------------------------- Test case: MAC_IPV4_SCTP_CHKSUM =============================== The rules and packets in this test case is similar to "Test case: MAC_IPV4_UDP_CHKSUM", just change some parts of rules and packets: rule: change udp to sctp packets: if the packet's L4 layer is UDP, change it to SCTP; if the packet's L4 layer is SCTP, change it to TCP; Subcase 1: MAC_IPV4_SCTP_L4_CHKSUM ---------------------------------- Subcase 2: MAC_IPV4_SCTP_IPV4_CHKSUM ------------------------------------ Test case: MAC_IPV6_UDP_L4_CHKSUM ================================= 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types l4-chksum end queues end / end 2. basic hit pattern packet:: p1 = Ether(src="52:00:00:00:00:00", dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010")/UDP(sport=22, dport=23, chksum=0x1)/("X"*48) 3. hit pattern/changed defined input set:: p2 = Ether(src="52:00:00:00:00:00", dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010")/UDP(sport=22, dport=23, chksum=0x2)/("X"*48) 4. hit pattern/changed not defined input set:: p3 = Ether(src="52:00:00:00:00:01", dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2021", src="ABAB:910A:2222:5498:8475:1111:3900:1011")/UDP(sport=32, dport=33, chksum=0x1)/("X"*48) Test case: MAC_IPV6_TCP_L4_CHKSUM ================================= 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types l4-chksum end queues end / end 2. basic hit pattern packet:: p1 = Ether(src="52:00:00:00:00:00", dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010")/TCP(sport=22, dport=23, chksum=0x1)/("X"*48) 3. hit pattern/changed defined input set:: p2 = Ether(src="52:00:00:00:00:00", dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010")/TCP(sport=22, dport=23, chksum=0x2)/("X"*48) 4. hit pattern/changed not defined input set:: p3 = Ether(src="52:00:00:00:00:01", dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2021", src="ABAB:910A:2222:5498:8475:1111:3900:1011")/TCP(sport=32, dport=33, chksum=0x1)/("X"*48) Test case: MAC_IPV6_SCTP_L4_CHKSUM ================================== 1. create rss rule:: flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types l4-chksum end queues end / end 2. basic hit pattern packet:: p1 = Ether(src="52:00:00:00:00:00", dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010")/SCTP(sport=22, dport=23, chksum=0xffffffff)/("X"*48) 3. hit pattern/changed defined input set:: p2 = Ether(src="52:00:00:00:00:00", dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010")/SCTP(sport=22, dport=23, chksum=0xfffffffe)/("X"*48) 4. hit pattern/changed not defined input set:: p3 = Ether(src="52:00:00:00:00:01", dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2021", src="ABAB:910A:2222:5498:8475:1111:3900:1011")/SCTP(sport=32, dport=33, chksum=0xffffffff)/("X"*48) Test case: Checksum for different payload length ================================================ 1. launch testpmd without "--disable-rss":: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c f -n 6 -- -i --rxq=16 --txq=16 testpmd> set fwd rxonly testpmd> set verbose 1 testpmd> start 2. Send packets with different payload length:: p1=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP()/("X"*48) p2=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP()/("X"*64) p3=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP()/UDP()/("X"*48) p4=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP()/UDP()/("X"*64) p5=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP()/TCP()/("X"*48) p6=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP()/TCP()/("X"*64) p7=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP()/SCTP()/("X"*48) p8=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP()/SCTP()/("X"*64) Check all the packets received have same hash value. 3. create RSS rule of 5-tuple inputset for each packet type:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end / end flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end / end 4. Send packets of step 2. Check the received packets with same packet type have same hash value. 5. create RSS rule of l4-chksum inputset for each packet type:: flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types l4-chksum end queues end / end flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types l4-chksum end queues end / end flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types l4-chksum end queues end / end 6. Send packets of step 2. Check the UDP/TCP/SCTP packets with different payload length have different hash value. 7. create RSS rule of ipv4-chksum inputset for each packet type:: flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-chksum end queues end / end flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-chksum end queues end / end flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-chksum end queues end / end flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-chksum end queues end / end 8. Send packets of step 2. Check the IPV4/UDP/TCP/SCTP packets with different payload length have different hash value. Test case: Set HW csum, flow rule does not impact RX checksum and TX checksum ============================================================================= 1. launch testpmd without "--disable-rss":: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c f -n 6 -- -i --rxq=16 --txq=16 2. Set tx checksum:: port stop all set fwd csum csum set ip hw 0 csum set udp hw 0 csum set tcp hw 0 csum set sctp hw 0 port start all set promisc 0 on set verbose 1 Due to DPDK 236bc417e2da(app/testpmd: fix MAC header in checksum forward engine) changes the checksum functions adds switches to control whether to exchange MAC address. Currently, our test scripts are based on not exchanging MAC addresses, mac-swap needs to be disabled: testpmd> csum mac-swap off 0 start 3. Capture the tx packet at tester port and check checksum values same as expect pkts:: take a IPV4 for example: p = Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48) p.show2() expect pkts checksum value: chksum= 0x3b0f tcpdump -i ens7 'ether src 40:a6:b7:0b:76:28 and ether[12:2] != 0x88cc' -Q in -w /tmp/tester/sniff_ens7.pcap -c 7 4. Send packets:: p1=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48) p2=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22, chksum=0xfff3)/("X"*48) p3=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22, chksum=0x1)/("X"*48) p4=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22, chksum=0x0)/("X"*48) p5=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48) p6=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48) p7=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22, chksum=0x0)/("X"*48) take a IPV4 for example: get sniff_ens7.pcap checksum value: 0x3b0f check the tx checksum correct. 5. Create rss rules with chsum as inputset:: flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-chksum end queues end / end flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types l4-chksum end queues end / end flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types l4-chksum end queues end / end flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types l4-chksum end queues end / end flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types l4-chksum end queues end / end flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types l4-chksum end queues end / end flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types l4-chksum end queues end / end 6. Send the same packets, check the hash value changed, check rx and tx checksum, get the same result. Test case: Combined case with fdir queue group ============================================== 1. start testpmd without "--disable-rss":: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c f -n 6 -- -i --rxq=16 --txq=16 testpmd> set fwd rxonly testpmd> set verbose 1 testpmd> start 2. Create fdir rules to queue group:: flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss queues 4 5 end / mark / end flow create 0 ingress pattern eth / ipv4 / udp / end actions rss queues 6 7 end / mark / end flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 / sctp / end actions rss queues 8 9 end mark / / end flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss queues 10 11 end / mark / end flow create 0 ingress pattern eth / ipv6 / udp / end actions rss queues 12 13 end / mark / end flow create 0 ingress pattern eth / ipv6 src is ABAB:910A:2222:5498:8475:1111:3900:1010 / sctp / end actions rss queues 14 15 end / mark / end 3. Send packets:: p1=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48) p2=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22, chksum=0xfff3)/("X"*48) p3=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22, chksum=0x1)/("X"*48) p4=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22, chksum=0x1)/("X"*48) p5=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48) p6=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48) p7=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6(src="ABAB:910A:2222:5498:8475:1111:3900:1010")/SCTP(sport=22, chksum=0xf)/("X"*48) Check p2-p7 are distributed to specified queue group, p1 is distributed by RSS hash value. 4. Create rss rule with inputset checksum:: flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-chksum end queues end / end flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types l4-chksum end queues end / end flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types l4-chksum end queues end / end flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types l4-chksum end queues end / end flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types l4-chksum end queues end / end flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types l4-chksum end queues end / end flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types l4-chksum end queues end / end Send same packets again. Check hash values of p2-p6 are changed, but queue group not changed. Check p1 hash value changed too, and distributed by RSS hash value. 5. Create fdir rule to queue group for ipv4 pattern:: flow destroy 0 rule 0 flow destroy 0 rule 1 flow destroy 0 rule 2 flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 / end actions rss queues 0 1 2 3 end / end Send p1, check the packet distributed to queue group without hash value changed. Test case: Negative case ======================== 1. create a rule with invalid inputset:: flow create 0 ingress pattern eth / ipv4 / end actions rss types l4-chksum end queues end / end ice_flow_create(): Failed to create flow port_flow_complain(): Caught PMD error type 10 (item specification): cause: 0x7fff0a9b9f80, Invalid input set: Invalid argument 2. create a rule with inputset not supported:: flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6-chksum end queues end / end Bad arguments