[V3] test_plans/cvl_switch_filter_qinq_test_plan: cvl support l4 for qinq switch filter

Message ID 20220118104408.180763-1-yaqi.tang@intel.com (mailing list archive)
State Changes Requested
Headers
Series [V3] test_plans/cvl_switch_filter_qinq_test_plan: cvl support l4 for qinq switch filter |

Checks

Context Check Description
ci/Intel-dts-doc-test fail Testing issues
ci/Intel-dts-suite-test warning SKIPPED

Commit Message

Yaqi Tang Jan. 18, 2022, 10:44 a.m. UTC
  CVL support l4 for QinQ switch filter in PF driver is by dst MAC + outer VLAN id + inner VLAN id + dst IP + dst port, and port can support as eth / vlan / vlan / IP / tcp|udp.

Signed-off-by: Yaqi Tang <yaqi.tang@intel.com>
Tested-by: Yaqi Tang < yaqi.tang@intel.com>
---
 .../cvl_switch_filter_qinq_test_plan.rst       | 689 ++++++++++++++++++
 1 file changed, 689 insertions(+)
 create mode 100644 test_plans/cvl_switch_filter_qinq_test_plan.rst
  

Comments

Lin, Xueqin Jan. 18, 2022, 5:30 a.m. UTC | #1
Why created new test plan for this QINQ protocol?
Suggest not include below description, could descript this test plan inlcudes which features, not list test case.
If add new test case in future, need to change below too? Not make sense.

+The test plan includes six test cases, such as MAC_QINQ_IPV4,
> MAC_QINQ_IPV6, MAC_QINQ_IPV4_UDP, MAC_QINQ_IPV4_TCP,
> MAC_QINQ_IPV6_UDP, MAC_QINQ_IPV6_TCP.


> -----Original Message-----
> From: Yaqi Tang <yaqi.tang@intel.com>
> Sent: Tuesday, January 18, 2022 6:44 PM
> To: dts@dpdk.org
> Cc: Tang, Yaqi <yaqi.tang@intel.com>
> Subject: [dts][PATCH V3] test_plans/cvl_switch_filter_qinq_test_plan: cvl
> support l4 for qinq switch filter
> 
> CVL support l4 for QinQ switch filter in PF driver is by dst MAC + outer VLAN id
> + inner VLAN id + dst IP + dst port, and port can support as eth / vlan / vlan / IP
> / tcp|udp.
> 
> Signed-off-by: Yaqi Tang <yaqi.tang@intel.com>
> Tested-by: Yaqi Tang < yaqi.tang@intel.com>
> ---
>  .../cvl_switch_filter_qinq_test_plan.rst       | 689 ++++++++++++++++++
>  1 file changed, 689 insertions(+)
>  create mode 100644 test_plans/cvl_switch_filter_qinq_test_plan.rst
> 
> diff --git a/test_plans/cvl_switch_filter_qinq_test_plan.rst
> b/test_plans/cvl_switch_filter_qinq_test_plan.rst
> new file mode 100644
> index 00000000..54404af0
> --- /dev/null
> +++ b/test_plans/cvl_switch_filter_qinq_test_plan.rst
> @@ -0,0 +1,689 @@
> +.. Copyright (c) <2021>, Intel Corporation
> +   All rights reserved.
> +
> +   Redistribution and use in source and binary forms, with or without
> +   modification, are permitted provided that the following conditions
> +   are met:
> +
> +   - Redistributions of source code must retain the above copyright
> +     notice, this list of conditions and the following disclaimer.
> +
> +   - Redistributions in binary form must reproduce the above copyright
> +     notice, this list of conditions and the following disclaimer in
> +     the documentation and/or other materials provided with the
> +     distribution.
> +
> +   - Neither the name of Intel Corporation nor the names of its
> +     contributors may be used to endorse or promote products derived
> +     from this software without specific prior written permission.
> +
> +   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
> CONTRIBUTORS
> +   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
> +   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
> +   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
> INDIRECT,
> +   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
> +   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> OR
> +   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> +   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> CONTRACT,
> +   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> +   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
> ADVISED
> +   OF THE POSSIBILITY OF SUCH DAMAGE.
> +
> +================================
> +CVL Switch Filter QINQ Test Plan
> +================================
> +
> +Description
> +===========
> +The test plan includes six test cases, such as MAC_QINQ_IPV4,
> MAC_QINQ_IPV6, MAC_QINQ_IPV4_UDP, MAC_QINQ_IPV4_TCP,
> MAC_QINQ_IPV6_UDP, MAC_QINQ_IPV6_TCP.
> +* Enable QINQ switch filter for IPv4/IPv6, IPv4 + TCP/UDP in non-pipeline
> mode.
> +* Enable QINQ switch filter for IPv6 + TCP/UDP in pipeline mode.
> +CVL support l4 for QinQ switch filter in PF driver is by dst MAC + outer VLAN
> id + inner VLAN id + dst IP + dst port, and port can support as eth / vlan / vlan /
> IP / tcp|udp.
> +
> +Prerequisites
> +=============
> +
> +Hardware
> +--------
> +Supportted NICs: columbiaville_25g/columbiaville_100g
> +
> +Software
> +--------
> +dpdk: http://dpdk.org/git/dpdk
> +scapy: http://www.secdev.org/projects/scapy/
> +
> +General Set Up
> +--------------
> +1. Copy specific ice package to /lib/firmware/updates/intel/ice/ddp/ice.pkg,
> +   then load driver::
> +
> +    # cp ice_comms-1.3.31.0.pkg /lib/firmware/updates/intel/ice/ddp/ice.pkg
> +    # rmmod ice
> +    # insmod ice.ko
> +
> +2. Compile DPDK::
> +
> +    # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib --default-
> library=static x86_64-native-linuxapp-gcc
> +    # ninja -C x86_64-native-linuxapp-gcc -j 110
> +
> +3. Get the pci device id and interface of DUT and tester::
> +
> +    # ./usertools/dpdk-devbind.py -s
> +
> +    0000:3b:00.0 'Ethernet Controller E810-C for SFP 1593' if=ens785f0 drv=ice
> unused=vfio-pci
> +    0000:af:00.0 'Ethernet Controller XXV710 for 25GbE SFP28 158b'
> if=ens260f0 drv=i40e unused=vfio-pci
> +
> +4. Bind the DUT port to dpdk::
> +
> +    # ./usertools/dpdk-devbind.py -b vfio-pci 0000:3b:00.0
> +
> +Test Case
> +=========
> +
> +Common Steps
> +------------
> +1. Launch the userland ``testpmd`` application on DUT as follows::
> +
> +     # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a
> 0000:3b:00.0 -- -i --txq=16 --rxq=16
> +
> +2. Set verbose::
> +
> +     testpmd> set verbose 1
> +
> +3. Set fwd engine and start::
> +
> +     testpmd> set fwd rxonly
> +     testpmd> start
> +
> +#Non-pipeline mode
> +
> +Test Case 1: MAC_QINQ_IPV4
> +--------------------------
> +The test case enable QINQ switch filter for IPv4 in non-pipeline mode, and
> port can support as dst MAC + outer VLAN id + inner VLAN id + IPv4.
> +
> +Test Steps
> +~~~~~~~~~~
> +1. Validate a rule::
> +
> +     testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 /
> vlan tci is 2 / vlan tci is 1 / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end
> actions queue index 2 / end
> +
> +   Get the message::
> +
> +     Flow rule validated
> +
> +2. Create a rule and list rules::
> +
> +     testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan
> tci is 2 / vlan tci is 1 / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions
> queue index 2 / end
> +
> +   Get the message::
> +
> +     Flow rule #0 created
> +
> +3. Check the flow list::
> +
> +     testpmd> flow list 0
> +
> +   ID      Group   Prio    Attr    Rule
> +   0       0       0       i--     ETH VLAN VLAN IPV4 => QUEUE
> +
> +4. Send matched packet in scapy on tester, check the DUT received this packet
> and the action is right.
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="192.168.1.1",
> dst="192.168.1.2")/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +    testpmd> port 0/queue 2: received 1 packets
> +  src=A4:BF:01:4D:6F:32 - dst=00:11:22:33:44:55 - type=0x8100 - length=122 -
> nb_segs=1 - RSS hash=0x26878aad - RSS queue=0x2 - hw ptype: L2_ETHER
> L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 -
> inner_l3_len=20 - Receive queue=0x2
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +5. Send mismatched packet in scapy on tester, check the DUT received this
> packet and the action is not right.
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="192.168.1.1",
> dst="192.168.1.2")/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +    testpmd> port 0/queue 13: received 1 packets
> +  src=A4:BF:01:4D:6F:32 - dst=00:11:22:33:44:33 - type=0x8100 - length=122 -
> nb_segs=1 - RSS hash=0x26878aad - RSS queue=0xd - hw ptype: L2_ETHER
> L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 -
> inner_l3_len=20 - Receive queue=0xd
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="192.168.1.1",
> dst="192.168.1.2")/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 13: received 1 packets
> +  src=A4:BF:01:4D:6F:32 - dst=00:11:22:33:44:55 - type=0x8100 - length=122 -
> nb_segs=1 - RSS hash=0x26878aad - RSS queue=0xd - hw ptype: L2_ETHER
> L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 -
> inner_l3_len=20 - Receive queue=0xd
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x2,type=0x0800)/IP(src="192.168.1.1",
> dst="192.168.1.2")/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 13: received 1 packets
> +  src=A4:BF:01:4D:6F:32 - dst=00:11:22:33:44:55 - type=0x8100 - length=122 -
> nb_segs=1 - RSS hash=0x26878aad - RSS queue=0xd - hw ptype: L2_ETHER
> L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 -
> inner_l3_len=20 - Receive queue=0xd
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="192.168.1.3",
> dst="192.168.1.2")/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 10: received 1 packets
> +  src=A4:BF:01:4D:6F:32 - dst=00:11:22:33:44:55 - type=0x8100 - length=122 -
> nb_segs=1 - RSS hash=0xc99a75ba - RSS queue=0xa - hw ptype: L2_ETHER
> L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 -
> inner_l3_len=20 - Receive queue=0xa
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +6. Destroy a rule and list rules::
> +
> +     testpmd> flow destroy 0 rule 0
> +
> +   Get the message::
> +
> +     Flow rule #0 destroyed
> +
> +7. Check the flow list::
> +
> +     testpmd> flow list 0
> +
> +   Check the rule not exists in the list.
> +   Send matched packets in step 4, check the action is not right.
> +
> +Test Case 2: MAC_QINQ_IPV6
> +--------------------------
> +The test case enable QINQ switch filter for IPv6 in non-pipeline mode, and
> port can support as dst MAC + outer VLAN id + inner VLAN id + IPv6.
> +
> +Test Steps
> +~~~~~~~~~~
> +1. Validate a rule::
> +
> +     testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 /
> vlan tci is 2 / vlan tci is 1 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions rss queues 2 3 end
> / end
> +
> +   Get the message::
> +
> +     Flow rule validated
> +
> +2. Create a rule and list rules::
> +
> +     testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan
> tci is 2 / vlan tci is 1 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020
> / end actions rss queues 2 3 end / end
> +
> +   Get the message::
> +
> +     Flow rule #0 created
> +
> +3. Check the flow list::
> +
> +     testpmd> flow list 0
> +
> +   ID      Group   Prio    Attr    Rule
> +   0       0       0       i--     ETH VLAN VLAN IPV6 => RSS
> +
> +4. Send matched packet in scapy on tester, check the DUT received this packet
> and the action is right.
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> 11:3900:2020")/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +    testpmd> port 0/queue 2: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 -
> nb_segs=1 - RSS hash=0xb0c13d2c - RSS queue=0x2 - hw ptype: L2_ETHER
> L3_IPV6_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV6  - l2_len=18 - inner_l2_len=4 -
> inner_l3_len=40 - Receive queue=0x2
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +5. Send mismatched packet in scapy on tester, check the DUT received this
> packet and the action is not right.
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> 11:3900:2020")/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +    testpmd> port 0/queue 12: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:33 - type=0x8100 - length=142 -
> nb_segs=1 - RSS hash=0xb0c13d2c - RSS queue=0xc - hw ptype: L2_ETHER
> L3_IPV6_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV6  - l2_len=18 - inner_l2_len=4 -
> inner_l3_len=40 - Receive queue=0xc
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> 11:3900:2020")/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 12: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 -
> nb_segs=1 - RSS hash=0xb0c13d2c - RSS queue=0xc - hw ptype: L2_ETHER
> L3_IPV6_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV6  - l2_len=18 - inner_l2_len=4 -
> inner_l3_len=40 - Receive queue=0xc
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x2,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> 11:3900:2020")/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 12: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 -
> nb_segs=1 - RSS hash=0xb0c13d2c - RSS queue=0xc - hw ptype: L2_ETHER
> L3_IPV6_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV6  - l2_len=18 - inner_l2_len=4 -
> inner_l3_len=40 - Receive queue=0xc
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> 11:3900:2023")/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 6: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 -
> nb_segs=1 - RSS hash=0x63517896 - RSS queue=0x6 - hw ptype: L2_ETHER
> L3_IPV6_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV6  - l2_len=18 - inner_l2_len=4 -
> inner_l3_len=40 - Receive queue=0x6
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +6. Destroy a rule and list rules::
> +
> +     testpmd> flow destroy 0 rule 0
> +
> +   Get the message::
> +
> +     Flow rule #0 destroyed
> +
> +7. Check the flow list::
> +
> +     testpmd> flow list 0
> +
> +   Check the rule not exists in the list.
> +   Send matched packets in step 4, check the action is not right.
> +
> +Test Case 3: MAC_QINQ_IPV4_UDP
> +------------------------------
> +The test case enable QINQ switch filter for IPv4 + UDP in non-pipeline mode,
> and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv4 + UDP.
> +
> +Test Steps
> +~~~~~~~~~~
> +1. Validate a rule::
> +
> +     testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 /
> vlan tci is 2 / vlan tci is 1 / ipv4 / udp src is 50 dst is 23 / end actions queue
> index 2 / end
> +
> +   Get the message::
> +
> +     Flow rule validated
> +
> +2. Create a rule and list rules::
> +
> +     testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan
> tci is 2 / vlan tci is 1 / ipv4 / udp src is 50 dst is 23 / end actions queue index 2 /
> end
> +
> +   Get the message::
> +
> +     Flow rule #0 created
> +
> +3. Check the flow list::
> +
> +     testpmd> flow list 0
> +
> +   ID      Group   Prio    Attr    Rule
> +   0       0       0       i--     ETH VLAN VLAN IPV4 UDP => QUEUE
> +
> +4. Send matched packet in scapy on tester, check the DUT received this packet
> and the action is right.
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x0800)/IP()/UDP(sport=50,dport=23)/("X"*80)],ifac
> e="ens260f0",count=1)
> +
> +DUT::
> +
> +    testpmd> port 0/queue 2: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=130 -
> nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x2 - hw ptype: L2_ETHER
> L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_UDP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x2
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +5. Send mismatched packet in scapy on tester, check the DUT received this
> packet and the action is not right.
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x0800)/IP()/UDP(sport=50,dport=23)/("X"*80)],ifac
> e="ens260f0",count=1)
> +
> +DUT::
> +
> +    testpmd> port 0/queue 3: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:33 - type=0x8100 - length=130 -
> nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER
> L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_UDP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x3
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x0800)/IP()/UDP(sport=50,dport=23)/("X"*80)],ifac
> e="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 3: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=130 -
> nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER
> L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_UDP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x3
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x2,type=0x0800)/IP()/UDP(sport=50,dport=23)/("X"*80)],ifac
> e="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 3: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=130 -
> nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER
> L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_UDP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x3
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x0800)/IP()/UDP(sport=50,dport=22)/("X"*80)],ifac
> e="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 3: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=130 -
> nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER
> L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_UDP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x3
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +6. Destroy a rule and list rules::
> +
> +     testpmd> flow destroy 0 rule 0
> +
> +   Get the message::
> +
> +     Flow rule #0 destroyed
> +
> +7. Check the flow list::
> +
> +     testpmd> flow list 0
> +
> +   Check the rule not exists in the list.
> +   Send matched packets in step 4, check the action is not right.
> +
> +Test Case 4: MAC_QINQ_IPV4_TCP
> +------------------------------
> +The test case enable QINQ switch filter for IPv4 + TCP in non-pipeline mode,
> and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv4 + TCP.
> +
> +Test Steps
> +~~~~~~~~~~
> +1. Validate a rule::
> +
> +     testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 /
> vlan tci is 2 / vlan tci is 1 / ipv4 / tcp src is 50 dst is 23 / end actions rss queues
> 4 5 end / end
> +
> +   Get the message::
> +
> +     Flow rule validated
> +
> +2. Create a rule and list rules::
> +
> +     testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan
> tci is 2 / vlan tci is 1 / ipv4 / tcp src is 50 dst is 23 / end actions rss queues 4 5
> end / end
> +
> +   Get the message::
> +
> +     Flow rule #0 created
> +
> +3. Check the flow list::
> +
> +     testpmd> flow list 0
> +
> +   ID      Group   Prio    Attr    Rule
> +   0       0       0       i--     ETH VLAN VLAN IPV4 TCP => RSS
> +
> +4. Send matched packet in scapy on tester, check the DUT received this packet
> and the action is right.
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x0800)/IP()/TCP(sport=50,dport=23)/("X"*80)],ifac
> e="ens260f0",count=1)
> +
> +DUT::
> +
> +    testpmd> port 0/queue 5: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 -
> nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x5 - hw ptype: L2_ETHER
> L3_IPV4_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_TCP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=20 - Receive queue=0x5
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +5. Send mismatched packet in scapy on tester, check the DUT received this
> packet and the action is not right.
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x0800)/IP()/TCP(sport=50,dport=23)/("X"*80)],ifac
> e="ens260f0",count=1)
> +
> +DUT::
> +
> +    testpmd> port 0/queue 3: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:33 - type=0x8100 - length=142 -
> nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER
> L3_IPV4_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_TCP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=20 - Receive queue=0x3
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x0800)/IP()/TCP(sport=50,dport=23)/("X"*80)],ifac
> e="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 3: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 -
> nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER
> L3_IPV4_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_TCP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=20 - Receive queue=0x3
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x2,type=0x0800)/IP()/TCP(sport=50,dport=23)/("X"*80)],ifac
> e="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 3: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 -
> nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER
> L3_IPV4_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_TCP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=20 - Receive queue=0x3
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x0800)/IP()/TCP(sport=50,dport=22)/("X"*80)],ifac
> e="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 3: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 -
> nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER
> L3_IPV4_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_TCP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=20 - Receive queue=0x3
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +6. Destroy a rule and list rules::
> +
> +     testpmd> flow destroy 0 rule 0
> +
> +   Get the message::
> +
> +     Flow rule #0 destroyed
> +
> +7. Check the flow list::
> +
> +     testpmd> flow list 0
> +
> +   Check the rule not exists in the list.
> +   Send matched packets in step 4, check the action is not right.
> +
> +#Pipeline mode
> +
> +Test Case 5: MAC_QINQ_IPV6_UDP
> +------------------------------
> +The test case enable QINQ switch filter for IPv6 + UDP in pipeline mode, and
> port can support as dst MAC + outer VLAN id + inner VLAN id + IPv6 + UDP.
> +
> +Test Steps
> +~~~~~~~~~~
> +1. Validate a rule::
> +
> +     testpmd> flow validate 0 priority 0 ingress pattern eth dst is
> 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 / udp src is 50 dst is 23 / end
> actions drop / end
> +
> +   Get the message::
> +
> +     Flow rule validated
> +
> +2. Create a rule and list rules::
> +
> +     testpmd> flow create 0 priority 0 ingress pattern eth dst is
> 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 / udp src is 50 dst is 23 / end
> actions drop / end
> +
> +   Get the message::
> +
> +     Flow rule #0 created
> +
> +3. Check the flow list::
> +
> +     testpmd> flow list 0
> +
> +   ID      Group   Prio    Attr    Rule
> +   0       0       0       i--     ETH VLAN VLAN IPV6 UDP => DROP
> +
> +4. Send matched packet in scapy on tester, check the DUT received this packet
> and the action is right.
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> 11:3900:2020")/UDP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +    testpmd>
> +
> +5. Send mismatched packet in scapy on tester, check the DUT received this
> packet and the action is not right.
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> 11:3900:2020")/UDP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +    testpmd> port 0/queue 15: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:33 - type=0x8100 - length=150 -
> nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER
> L3_IPV6_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_UDP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=8 - Receive queue=0xf
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> 11:3900:2020")/UDP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 15: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=150 -
> nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER
> L3_IPV6_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_UDP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=8 - Receive queue=0xf
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x2,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> 11:3900:2020")/UDP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 15: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=150 -
> nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER
> L3_IPV6_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_UDP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=8 - Receive queue=0xf
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> 11:3900:2020")/UDP(sport=50,dport=22)/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 15: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=150 -
> nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER
> L3_IPV6_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_UDP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=8 - Receive queue=0xf
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +6. Destroy a rule and list rules::
> +
> +     testpmd> flow destroy 0 rule 0
> +
> +   Get the message::
> +
> +     Flow rule #0 destroyed
> +
> +7. Check the flow list::
> +
> +     testpmd> flow list 0
> +
> +   Check the rule not exists in the list.
> +   Send matched packets in step 4, check the action is not right.
> +
> +Test Case 6: MAC_QINQ_IPV6_TCP
> +------------------------------
> +The test case enable QINQ switch filter for IPv6 + TCP in pipeline mode, and
> port can support as dst MAC + outer VLAN id + inner VLAN id + IPv6 + TCP.
> +
> +Test Steps
> +~~~~~~~~~~
> +1. Validate a rule::
> +
> +     testpmd> flow validate 0 priority 0 ingress pattern eth dst is
> 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 / tcp src is 50 dst is 23 / end
> actions queue index 7 / end
> +
> +   Get the message::
> +
> +     Flow rule validated
> +
> +2. Create a rule and list rules::
> +
> +     testpmd> flow create 0 priority 0 ingress pattern eth dst is
> 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv6 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 / tcp src is 50 dst is 23 / end
> actions queue index 7 / end
> +
> +   Get the message::
> +
> +     Flow rule #0 created
> +
> +3. Check the flow list::
> +
> +     testpmd> flow list 0
> +
> +   ID      Group   Prio    Attr    Rule
> +   0       0       0       i--     ETH VLAN VLAN IPV6 TCP => QUEUE
> +
> +4. Send matched packet in scapy on tester, check the DUT received this packet
> and the action is right.
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> 11:3900:2020")/TCP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +    testpmd> port 0/queue 7: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=162 -
> nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0x7 - hw ptype: L2_ETHER
> L3_IPV6_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_TCP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=20 - Receive queue=0x7
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +5. Send mismatched packet in scapy on tester, check the DUT received this
> packet and the action is not right.
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> 11:3900:2020")/TCP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +    testpmd> port 0/queue 15: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:33 - type=0x8100 - length=162 -
> nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER
> L3_IPV6_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_TCP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=20 - Receive queue=0xf
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> 11:3900:2020")/TCP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 15: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=162 -
> nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER
> L3_IPV6_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_TCP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=20 - Receive queue=0xf
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x2,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> 11:3900:2020")/TCP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 15: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=162 -
> nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER
> L3_IPV6_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_TCP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=20 - Receive queue=0xf
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +Tester::
> +
> +    >>>
> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x81
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> 11:3900:2020")/TCP(sport=50,dport=22)/("X"*80)],iface="ens260f0",count=1)
> +
> +DUT::
> +
> +   testpmd> port 0/queue 15: received 1 packets
> +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=162 -
> nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER
> L3_IPV6_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_TCP  - l2_len=18 -
> inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=20 - Receive queue=0xf
> +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> RTE_MBUF_F_RX_IP_CKSUM_GOOD
> RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> +
> +6. Destroy a rule and list rules::
> +
> +     testpmd> flow destroy 0 rule 0
> +
> +   Get the message::
> +
> +     Flow rule #0 destroyed
> +
> +7. Check the flow list::
> +
> +     testpmd> flow list 0
> +
> +   Check the rule not exists in the list.
> +   Send matched packets in step 4, check the action is not right.
> +
> +
> --
> 2.25.1
  
Lin, Xueqin Jan. 19, 2022, 3:06 a.m. UTC | #2
> -----Original Message-----
> From: Lin, Xueqin <xueqin.lin@intel.com>
> Sent: Tuesday, January 18, 2022 1:31 PM
> To: Tang, Yaqi <yaqi.tang@intel.com>; dts@dpdk.org
> Cc: Tang, Yaqi <yaqi.tang@intel.com>
> Subject: RE: [dts][PATCH V3] test_plans/cvl_switch_filter_qinq_test_plan: cvl
> support l4 for qinq switch filter
> 
> Why created new test plan for this QINQ protocol?
> Suggest not include below description, could descript this test plan inlcudes
> which features, not list test case.
> If add new test case in future, need to change below too? Not make sense.
> 
> +The test plan includes six test cases, such as MAC_QINQ_IPV4,
> > MAC_QINQ_IPV6, MAC_QINQ_IPV4_UDP, MAC_QINQ_IPV4_TCP,
> > MAC_QINQ_IPV6_UDP, MAC_QINQ_IPV6_TCP.
> 
> 
> > -----Original Message-----
> > From: Yaqi Tang <yaqi.tang@intel.com>
> > Sent: Tuesday, January 18, 2022 6:44 PM
> > To: dts@dpdk.org
> > Cc: Tang, Yaqi <yaqi.tang@intel.com>
> > Subject: [dts][PATCH V3] test_plans/cvl_switch_filter_qinq_test_plan:
> > cvl support l4 for qinq switch filter
> >
> > CVL support l4 for QinQ switch filter in PF driver is by dst MAC +
> > outer VLAN id
> > + inner VLAN id + dst IP + dst port, and port can support as eth /
> > + vlan / vlan / IP
> > / tcp|udp.
> >
> > Signed-off-by: Yaqi Tang <yaqi.tang@intel.com>
> > Tested-by: Yaqi Tang < yaqi.tang@intel.com>
> > ---
> >  .../cvl_switch_filter_qinq_test_plan.rst       | 689 ++++++++++++++++++
> >  1 file changed, 689 insertions(+)
> >  create mode 100644 test_plans/cvl_switch_filter_qinq_test_plan.rst
> >
> > diff --git a/test_plans/cvl_switch_filter_qinq_test_plan.rst
> > b/test_plans/cvl_switch_filter_qinq_test_plan.rst
> > new file mode 100644
> > index 00000000..54404af0
> > --- /dev/null
> > +++ b/test_plans/cvl_switch_filter_qinq_test_plan.rst
> > @@ -0,0 +1,689 @@
> > +.. Copyright (c) <2021>, Intel Corporation
> > +   All rights reserved.
> > +
> > +   Redistribution and use in source and binary forms, with or without
> > +   modification, are permitted provided that the following conditions
> > +   are met:
> > +
> > +   - Redistributions of source code must retain the above copyright
> > +     notice, this list of conditions and the following disclaimer.
> > +
> > +   - Redistributions in binary form must reproduce the above copyright
> > +     notice, this list of conditions and the following disclaimer in
> > +     the documentation and/or other materials provided with the
> > +     distribution.
> > +
> > +   - Neither the name of Intel Corporation nor the names of its
> > +     contributors may be used to endorse or promote products derived
> > +     from this software without specific prior written permission.
> > +
> > +   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
> > CONTRIBUTORS
> > +   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
> NOT
> > +   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
> FITNESS
> > +   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
> > +   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
> > INDIRECT,
> > +   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
> > +   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
> GOODS
> > OR
> > +   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> > +   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> > CONTRACT,
> > +   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> > +   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
> > ADVISED
> > +   OF THE POSSIBILITY OF SUCH DAMAGE.
> > +
> > +================================
> > +CVL Switch Filter QINQ Test Plan
> > +================================
> > +
> > +Description
> > +===========
> > +The test plan includes six test cases, such as MAC_QINQ_IPV4,
> > MAC_QINQ_IPV6, MAC_QINQ_IPV4_UDP, MAC_QINQ_IPV4_TCP,
> > MAC_QINQ_IPV6_UDP, MAC_QINQ_IPV6_TCP.
> > +* Enable QINQ switch filter for IPv4/IPv6, IPv4 + TCP/UDP in
> > +non-pipeline
> > mode.
> > +* Enable QINQ switch filter for IPv6 + TCP/UDP in pipeline mode.
> > +CVL support l4 for QinQ switch filter in PF driver is by dst MAC +
> > +outer VLAN
> > id + inner VLAN id + dst IP + dst port, and port can support as eth /
> > vlan / vlan / IP / tcp|udp.
> > +
> > +Prerequisites
> > +=============
> > +
> > +Hardware
> > +--------
> > +Supportted NICs: columbiaville_25g/columbiaville_100g
> > +
> > +Software
> > +--------
> > +dpdk: http://dpdk.org/git/dpdk
> > +scapy: http://www.secdev.org/projects/scapy/
> > +
> > +General Set Up
> > +--------------
> > +1. Copy specific ice package to /lib/firmware/updates/intel/ice/ddp/ice.pkg,
> > +   then load driver::
> > +
> > +    # cp ice_comms-1.3.31.0.pkg /lib/firmware/updates/intel/ice/ddp/ice.pkg

Not list this version comms package for the test, other newer version should also support. 

> > +    # rmmod ice
> > +    # insmod ice.ko
> > +
> > +2. Compile DPDK::
> > +
> > +    # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib
> > + --default-
> > library=static x86_64-native-linuxapp-gcc
> > +    # ninja -C x86_64-native-linuxapp-gcc -j 110
> > +
> > +3. Get the pci device id and interface of DUT and tester::
> > +
> > +    # ./usertools/dpdk-devbind.py -s
> > +
> > +    0000:3b:00.0 'Ethernet Controller E810-C for SFP 1593'
> > + if=ens785f0 drv=ice
> > unused=vfio-pci
> > +    0000:af:00.0 'Ethernet Controller XXV710 for 25GbE SFP28 158b'
> > if=ens260f0 drv=i40e unused=vfio-pci
> > +
> > +4. Bind the DUT port to dpdk::
> > +
> > +    # ./usertools/dpdk-devbind.py -b vfio-pci 0000:3b:00.0
> > +
> > +Test Case
> > +=========
> > +
> > +Common Steps
> > +------------
> > +1. Launch the userland ``testpmd`` application on DUT as follows::
> > +
> > +     # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a
> > 0000:3b:00.0 -- -i --txq=16 --rxq=16

Use template format for the whole test plan. 

Testpmd parameter setup are different when testing non-pipeline and pipeline mode, not same. 

> > +
> > +2. Set verbose::
> > +
> > +     testpmd> set verbose 1
> > +
> > +3. Set fwd engine and start::
> > +
> > +     testpmd> set fwd rxonly
> > +     testpmd> start
> > +
> > +#Non-pipeline mode
> > +
> > +Test Case 1: MAC_QINQ_IPV4
> > +--------------------------
> > +The test case enable QINQ switch filter for IPv4 in non-pipeline
> > +mode, and
> > port can support as dst MAC + outer VLAN id + inner VLAN id + IPv4.
> > +
> > +Test Steps
> > +~~~~~~~~~~
> > +1. Validate a rule::
> > +
> > +     testpmd> flow validate 0 ingress pattern eth dst is
> > + 00:11:22:33:44:55 /
> > vlan tci is 2 / vlan tci is 1 / ipv4 src is 192.168.1.1 dst is
> > 192.168.1.2 / end actions queue index 2 / end
> > +
> > +   Get the message::
> > +
> > +     Flow rule validated
> > +
> > +2. Create a rule and list rules::
> > +
> > +     testpmd> flow create 0 ingress pattern eth dst is
> > + 00:11:22:33:44:55 / vlan
> > tci is 2 / vlan tci is 1 / ipv4 src is 192.168.1.1 dst is 192.168.1.2
> > / end actions queue index 2 / end
> > +
> > +   Get the message::
> > +
> > +     Flow rule #0 created
> > +
> > +3. Check the flow list::
> > +
> > +     testpmd> flow list 0
> > +
> > +   ID      Group   Prio    Attr    Rule
> > +   0       0       0       i--     ETH VLAN VLAN IPV4 => QUEUE
> > +
> > +4. Send matched packet in scapy on tester, check the DUT received
> > +this packet
> > and the action is right.
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81 00)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="192.168.1.1",
> > dst="192.168.1.2")/("X"*80)],iface="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +    testpmd> port 0/queue 2: received 1 packets
> > +  src=A4:BF:01:4D:6F:32 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=122 -
> > nb_segs=1 - RSS hash=0x26878aad - RSS queue=0x2 - hw ptype: L2_ETHER
> > L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 -
> > inner_l3_len=20 - Receive queue=0x2
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +5. Send mismatched packet in scapy on tester, check the DUT received
> > +this
> > packet and the action is not right.
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81 00)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="192.168.1.1",
> > dst="192.168.1.2")/("X"*80)],iface="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +    testpmd> port 0/queue 13: received 1 packets
> > +  src=A4:BF:01:4D:6F:32 - dst=00:11:22:33:44:33 - type=0x8100 -
> > + length=122 -
> > nb_segs=1 - RSS hash=0x26878aad - RSS queue=0xd - hw ptype: L2_ETHER
> > L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 -
> > inner_l3_len=20 - Receive queue=0xd
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x
> > 81 00)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="192.168.1.1",
> > dst="192.168.1.2")/("X"*80)],iface="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 13: received 1 packets
> > +  src=A4:BF:01:4D:6F:32 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=122 -
> > nb_segs=1 - RSS hash=0x26878aad - RSS queue=0xd - hw ptype: L2_ETHER
> > L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 -
> > inner_l3_len=20 - Receive queue=0xd
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81 00)/Dot1Q(vlan=0x2,type=0x0800)/IP(src="192.168.1.1",
> > dst="192.168.1.2")/("X"*80)],iface="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 13: received 1 packets
> > +  src=A4:BF:01:4D:6F:32 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=122 -
> > nb_segs=1 - RSS hash=0x26878aad - RSS queue=0xd - hw ptype: L2_ETHER
> > L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 -
> > inner_l3_len=20 - Receive queue=0xd
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81 00)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="192.168.1.3",
> > dst="192.168.1.2")/("X"*80)],iface="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 10: received 1 packets
> > +  src=A4:BF:01:4D:6F:32 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=122 -
> > nb_segs=1 - RSS hash=0xc99a75ba - RSS queue=0xa - hw ptype: L2_ETHER
> > L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 -
> > inner_l3_len=20 - Receive queue=0xa
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +6. Destroy a rule and list rules::
> > +
> > +     testpmd> flow destroy 0 rule 0
> > +
> > +   Get the message::
> > +
> > +     Flow rule #0 destroyed
> > +
> > +7. Check the flow list::
> > +
> > +     testpmd> flow list 0
> > +
> > +   Check the rule not exists in the list.
> > +   Send matched packets in step 4, check the action is not right.
> > +
> > +Test Case 2: MAC_QINQ_IPV6
> > +--------------------------
> > +The test case enable QINQ switch filter for IPv6 in non-pipeline
> > +mode, and
> > port can support as dst MAC + outer VLAN id + inner VLAN id + IPv6.
> > +
> > +Test Steps
> > +~~~~~~~~~~
> > +1. Validate a rule::
> > +
> > +     testpmd> flow validate 0 ingress pattern eth dst is
> > + 00:11:22:33:44:55 /
> > vlan tci is 2 / vlan tci is 1 / ipv6 dst is
> > CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions rss queues 2 3
> > end / end
> > +
> > +   Get the message::
> > +
> > +     Flow rule validated
> > +
> > +2. Create a rule and list rules::
> > +
> > +     testpmd> flow create 0 ingress pattern eth dst is
> > + 00:11:22:33:44:55 / vlan
> > tci is 2 / vlan tci is 1 / ipv6 dst is
> > CDCD:910A:2222:5498:8475:1111:3900:2020
> > / end actions rss queues 2 3 end / end
> > +
> > +   Get the message::
> > +
> > +     Flow rule #0 created
> > +
> > +3. Check the flow list::
> > +
> > +     testpmd> flow list 0
> > +
> > +   ID      Group   Prio    Attr    Rule
> > +   0       0       0       i--     ETH VLAN VLAN IPV6 => RSS
> > +
> > +4. Send matched packet in scapy on tester, check the DUT received
> > +this packet
> > and the action is right.
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> >
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> > 11:3900:2020")/("X"*80)],iface="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +    testpmd> port 0/queue 2: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=142 -
> > nb_segs=1 - RSS hash=0xb0c13d2c - RSS queue=0x2 - hw ptype: L2_ETHER
> > L3_IPV6_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV6  - l2_len=18 - inner_l2_len=4 -
> > inner_l3_len=40 - Receive queue=0x2
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +5. Send mismatched packet in scapy on tester, check the DUT received
> > +this
> > packet and the action is not right.
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> >
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> > 11:3900:2020")/("X"*80)],iface="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +    testpmd> port 0/queue 12: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:33 - type=0x8100 -
> > + length=142 -
> > nb_segs=1 - RSS hash=0xb0c13d2c - RSS queue=0xc - hw ptype: L2_ETHER
> > L3_IPV6_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV6  - l2_len=18 - inner_l2_len=4 -
> > inner_l3_len=40 - Receive queue=0xc
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x
> > 81
> >
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> > 11:3900:2020")/("X"*80)],iface="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 12: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=142 -
> > nb_segs=1 - RSS hash=0xb0c13d2c - RSS queue=0xc - hw ptype: L2_ETHER
> > L3_IPV6_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV6  - l2_len=18 - inner_l2_len=4 -
> > inner_l3_len=40 - Receive queue=0xc
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> >
> 00)/Dot1Q(vlan=0x2,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> > 11:3900:2020")/("X"*80)],iface="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 12: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=142 -
> > nb_segs=1 - RSS hash=0xb0c13d2c - RSS queue=0xc - hw ptype: L2_ETHER
> > L3_IPV6_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV6  - l2_len=18 - inner_l2_len=4 -
> > inner_l3_len=40 - Receive queue=0xc
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> >
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> > 11:3900:2023")/("X"*80)],iface="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 6: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=142 -
> > nb_segs=1 - RSS hash=0x63517896 - RSS queue=0x6 - hw ptype: L2_ETHER
> > L3_IPV6_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV6  - l2_len=18 - inner_l2_len=4 -
> > inner_l3_len=40 - Receive queue=0x6
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +6. Destroy a rule and list rules::
> > +
> > +     testpmd> flow destroy 0 rule 0
> > +
> > +   Get the message::
> > +
> > +     Flow rule #0 destroyed
> > +
> > +7. Check the flow list::
> > +
> > +     testpmd> flow list 0
> > +
> > +   Check the rule not exists in the list.
> > +   Send matched packets in step 4, check the action is not right.
> > +
> > +Test Case 3: MAC_QINQ_IPV4_UDP
> > +------------------------------
> > +The test case enable QINQ switch filter for IPv4 + UDP in
> > +non-pipeline mode,
> > and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv4 +
> UDP.
> > +
> > +Test Steps
> > +~~~~~~~~~~
> > +1. Validate a rule::
> > +
> > +     testpmd> flow validate 0 ingress pattern eth dst is
> > + 00:11:22:33:44:55 /
> > vlan tci is 2 / vlan tci is 1 / ipv4 / udp src is 50 dst is 23 / end
> > actions queue index 2 / end
> > +
> > +   Get the message::
> > +
> > +     Flow rule validated
> > +
> > +2. Create a rule and list rules::
> > +
> > +     testpmd> flow create 0 ingress pattern eth dst is
> > + 00:11:22:33:44:55 / vlan
> > tci is 2 / vlan tci is 1 / ipv4 / udp src is 50 dst is 23 / end
> > actions queue index 2 / end
> > +
> > +   Get the message::
> > +
> > +     Flow rule #0 created
> > +
> > +3. Check the flow list::
> > +
> > +     testpmd> flow list 0
> > +
> > +   ID      Group   Prio    Attr    Rule
> > +   0       0       0       i--     ETH VLAN VLAN IPV4 UDP => QUEUE
> > +
> > +4. Send matched packet in scapy on tester, check the DUT received
> > +this packet
> > and the action is right.
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> > 00)/Dot1Q(vlan=0x1,type=0x0800)/IP()/UDP(sport=50,dport=23)/("X"*80)],
> > ifac
> > e="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +    testpmd> port 0/queue 2: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=130 -
> > nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x2 - hw ptype: L2_ETHER
> > L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_UDP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x2
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +5. Send mismatched packet in scapy on tester, check the DUT received
> > +this
> > packet and the action is not right.
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> > 00)/Dot1Q(vlan=0x1,type=0x0800)/IP()/UDP(sport=50,dport=23)/("X"*80)],
> > ifac
> > e="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +    testpmd> port 0/queue 3: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:33 - type=0x8100 -
> > + length=130 -
> > nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER
> > L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_UDP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x3
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x
> > 81
> > 00)/Dot1Q(vlan=0x1,type=0x0800)/IP()/UDP(sport=50,dport=23)/("X"*80)],
> > ifac
> > e="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 3: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=130 -
> > nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER
> > L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_UDP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x3
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> > 00)/Dot1Q(vlan=0x2,type=0x0800)/IP()/UDP(sport=50,dport=23)/("X"*80)],
> > ifac
> > e="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 3: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=130 -
> > nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER
> > L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_UDP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x3
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> > 00)/Dot1Q(vlan=0x1,type=0x0800)/IP()/UDP(sport=50,dport=22)/("X"*80)],
> > ifac
> > e="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 3: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=130 -
> > nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER
> > L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_UDP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x3
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +6. Destroy a rule and list rules::
> > +
> > +     testpmd> flow destroy 0 rule 0
> > +
> > +   Get the message::
> > +
> > +     Flow rule #0 destroyed
> > +
> > +7. Check the flow list::
> > +
> > +     testpmd> flow list 0
> > +
> > +   Check the rule not exists in the list.
> > +   Send matched packets in step 4, check the action is not right.
> > +
> > +Test Case 4: MAC_QINQ_IPV4_TCP
> > +------------------------------
> > +The test case enable QINQ switch filter for IPv4 + TCP in
> > +non-pipeline mode,
> > and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv4 + TCP.
> > +
> > +Test Steps
> > +~~~~~~~~~~
> > +1. Validate a rule::
> > +
> > +     testpmd> flow validate 0 ingress pattern eth dst is
> > + 00:11:22:33:44:55 /
> > vlan tci is 2 / vlan tci is 1 / ipv4 / tcp src is 50 dst is 23 / end
> > actions rss queues
> > 4 5 end / end
> > +
> > +   Get the message::
> > +
> > +     Flow rule validated
> > +
> > +2. Create a rule and list rules::
> > +
> > +     testpmd> flow create 0 ingress pattern eth dst is
> > + 00:11:22:33:44:55 / vlan
> > tci is 2 / vlan tci is 1 / ipv4 / tcp src is 50 dst is 23 / end
> > actions rss queues 4 5 end / end
> > +
> > +   Get the message::
> > +
> > +     Flow rule #0 created
> > +
> > +3. Check the flow list::
> > +
> > +     testpmd> flow list 0
> > +
> > +   ID      Group   Prio    Attr    Rule
> > +   0       0       0       i--     ETH VLAN VLAN IPV4 TCP => RSS
> > +
> > +4. Send matched packet in scapy on tester, check the DUT received
> > +this packet
> > and the action is right.
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> > 00)/Dot1Q(vlan=0x1,type=0x0800)/IP()/TCP(sport=50,dport=23)/("X"*80)],
> > ifac
> > e="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +    testpmd> port 0/queue 5: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=142 -
> > nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x5 - hw ptype: L2_ETHER
> > L3_IPV4_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_TCP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=20 - Receive queue=0x5
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +5. Send mismatched packet in scapy on tester, check the DUT received
> > +this
> > packet and the action is not right.
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> > 00)/Dot1Q(vlan=0x1,type=0x0800)/IP()/TCP(sport=50,dport=23)/("X"*80)],
> > ifac
> > e="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +    testpmd> port 0/queue 3: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:33 - type=0x8100 -
> > + length=142 -
> > nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER
> > L3_IPV4_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_TCP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=20 - Receive queue=0x3
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x
> > 81
> > 00)/Dot1Q(vlan=0x1,type=0x0800)/IP()/TCP(sport=50,dport=23)/("X"*80)],
> > ifac
> > e="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 3: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=142 -
> > nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER
> > L3_IPV4_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_TCP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=20 - Receive queue=0x3
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> > 00)/Dot1Q(vlan=0x2,type=0x0800)/IP()/TCP(sport=50,dport=23)/("X"*80)],
> > ifac
> > e="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 3: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=142 -
> > nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER
> > L3_IPV4_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_TCP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=20 - Receive queue=0x3
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> > 00)/Dot1Q(vlan=0x1,type=0x0800)/IP()/TCP(sport=50,dport=22)/("X"*80)],
> > ifac
> > e="ens260f0",count=1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 3: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=142 -
> > nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER
> > L3_IPV4_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_TCP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=20 - Receive queue=0x3
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +6. Destroy a rule and list rules::
> > +
> > +     testpmd> flow destroy 0 rule 0
> > +
> > +   Get the message::
> > +
> > +     Flow rule #0 destroyed
> > +
> > +7. Check the flow list::
> > +
> > +     testpmd> flow list 0
> > +
> > +   Check the rule not exists in the list.
> > +   Send matched packets in step 4, check the action is not right.
> > +
> > +#Pipeline mode
> > +
> > +Test Case 5: MAC_QINQ_IPV6_UDP
> > +------------------------------
> > +The test case enable QINQ switch filter for IPv6 + UDP in pipeline
> > +mode, and
> > port can support as dst MAC + outer VLAN id + inner VLAN id + IPv6 + UDP.
> > +
> > +Test Steps
> > +~~~~~~~~~~
> > +1. Validate a rule::
> > +
> > +     testpmd> flow validate 0 priority 0 ingress pattern eth dst is
> > 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv6 dst is
> > CDCD:910A:2222:5498:8475:1111:3900:2020 / udp src is 50 dst is 23 /
> > end actions drop / end
> > +
> > +   Get the message::
> > +
> > +     Flow rule validated
> > +
> > +2. Create a rule and list rules::
> > +
> > +     testpmd> flow create 0 priority 0 ingress pattern eth dst is
> > 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv6 dst is
> > CDCD:910A:2222:5498:8475:1111:3900:2020 / udp src is 50 dst is 23 /
> > end actions drop / end
> > +
> > +   Get the message::
> > +
> > +     Flow rule #0 created
> > +
> > +3. Check the flow list::
> > +
> > +     testpmd> flow list 0
> > +
> > +   ID      Group   Prio    Attr    Rule
> > +   0       0       0       i--     ETH VLAN VLAN IPV6 UDP => DROP
> > +
> > +4. Send matched packet in scapy on tester, check the DUT received
> > +this packet
> > and the action is right.
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> >
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> > 11:3900:2020")/UDP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count
> > =1)
> > +
> > +DUT::
> > +
> > +    testpmd>
> > +
> > +5. Send mismatched packet in scapy on tester, check the DUT received
> > +this
> > packet and the action is not right.
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> >
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> > 11:3900:2020")/UDP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count
> > =1)
> > +
> > +DUT::
> > +
> > +    testpmd> port 0/queue 15: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:33 - type=0x8100 -
> > + length=150 -
> > nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER
> > L3_IPV6_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_UDP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=8 - Receive queue=0xf
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x
> > 81
> >
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> > 11:3900:2020")/UDP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count
> > =1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 15: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=150 -
> > nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER
> > L3_IPV6_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_UDP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=8 - Receive queue=0xf
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> >
> 00)/Dot1Q(vlan=0x2,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> > 11:3900:2020")/UDP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count
> > =1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 15: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=150 -
> > nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER
> > L3_IPV6_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_UDP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=8 - Receive queue=0xf
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> >
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> > 11:3900:2020")/UDP(sport=50,dport=22)/("X"*80)],iface="ens260f0",count
> > =1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 15: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=150 -
> > nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER
> > L3_IPV6_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_UDP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=8 - Receive queue=0xf
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +6. Destroy a rule and list rules::
> > +
> > +     testpmd> flow destroy 0 rule 0
> > +
> > +   Get the message::
> > +
> > +     Flow rule #0 destroyed
> > +
> > +7. Check the flow list::
> > +
> > +     testpmd> flow list 0
> > +
> > +   Check the rule not exists in the list.
> > +   Send matched packets in step 4, check the action is not right.
> > +
> > +Test Case 6: MAC_QINQ_IPV6_TCP
> > +------------------------------
> > +The test case enable QINQ switch filter for IPv6 + TCP in pipeline
> > +mode, and
> > port can support as dst MAC + outer VLAN id + inner VLAN id + IPv6 + TCP.
> > +
> > +Test Steps
> > +~~~~~~~~~~
> > +1. Validate a rule::
> > +
> > +     testpmd> flow validate 0 priority 0 ingress pattern eth dst is
> > 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv6 dst is
> > CDCD:910A:2222:5498:8475:1111:3900:2020 / tcp src is 50 dst is 23 /
> > end actions queue index 7 / end
> > +
> > +   Get the message::
> > +
> > +     Flow rule validated
> > +
> > +2. Create a rule and list rules::
> > +
> > +     testpmd> flow create 0 priority 0 ingress pattern eth dst is
> > 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv6 dst is
> > CDCD:910A:2222:5498:8475:1111:3900:2020 / tcp src is 50 dst is 23 /
> > end actions queue index 7 / end
> > +
> > +   Get the message::
> > +
> > +     Flow rule #0 created
> > +
> > +3. Check the flow list::
> > +
> > +     testpmd> flow list 0
> > +
> > +   ID      Group   Prio    Attr    Rule
> > +   0       0       0       i--     ETH VLAN VLAN IPV6 TCP => QUEUE
> > +
> > +4. Send matched packet in scapy on tester, check the DUT received
> > +this packet
> > and the action is right.
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> >
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> > 11:3900:2020")/TCP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count
> > =1)
> > +
> > +DUT::
> > +
> > +    testpmd> port 0/queue 7: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=162 -
> > nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0x7 - hw ptype: L2_ETHER
> > L3_IPV6_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_TCP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=20 - Receive queue=0x7
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +5. Send mismatched packet in scapy on tester, check the DUT received
> > +this
> > packet and the action is not right.
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> >
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> > 11:3900:2020")/TCP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count
> > =1)
> > +
> > +DUT::
> > +
> > +    testpmd> port 0/queue 15: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:33 - type=0x8100 -
> > + length=162 -
> > nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER
> > L3_IPV6_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_TCP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=20 - Receive queue=0xf
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x
> > 81
> >
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> > 11:3900:2020")/TCP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count
> > =1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 15: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=162 -
> > nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER
> > L3_IPV6_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_TCP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=20 - Receive queue=0xf
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> >
> 00)/Dot1Q(vlan=0x2,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> > 11:3900:2020")/TCP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count
> > =1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 15: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=162 -
> > nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER
> > L3_IPV6_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_TCP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=20 - Receive queue=0xf
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +Tester::
> > +
> > +    >>>
> > sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x
> > 81
> >
> 00)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:11
> > 11:3900:2020")/TCP(sport=50,dport=22)/("X"*80)],iface="ens260f0",count
> > =1)
> > +
> > +DUT::
> > +
> > +   testpmd> port 0/queue 15: received 1 packets
> > +  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 -
> > + length=162 -
> > nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER
> > L3_IPV6_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN
> > INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_TCP  - l2_len=18 -
> > inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=20 - Receive queue=0xf
> > +  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
> > RTE_MBUF_F_RX_IP_CKSUM_GOOD
> > RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
> > +
> > +6. Destroy a rule and list rules::
> > +
> > +     testpmd> flow destroy 0 rule 0
> > +
> > +   Get the message::
> > +
> > +     Flow rule #0 destroyed
> > +
> > +7. Check the flow list::
> > +
> > +     testpmd> flow list 0
> > +
> > +   Check the rule not exists in the list.
> > +   Send matched packets in step 4, check the action is not right.
> > +
> > +
> > --
> > 2.25.1
  

Patch

diff --git a/test_plans/cvl_switch_filter_qinq_test_plan.rst b/test_plans/cvl_switch_filter_qinq_test_plan.rst
new file mode 100644
index 00000000..54404af0
--- /dev/null
+++ b/test_plans/cvl_switch_filter_qinq_test_plan.rst
@@ -0,0 +1,689 @@ 
+.. Copyright (c) <2021>, Intel Corporation
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+
+   - Neither the name of Intel Corporation nor the names of its
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+   OF THE POSSIBILITY OF SUCH DAMAGE.
+
+================================
+CVL Switch Filter QINQ Test Plan
+================================
+
+Description
+===========
+The test plan includes six test cases, such as MAC_QINQ_IPV4, MAC_QINQ_IPV6, MAC_QINQ_IPV4_UDP, MAC_QINQ_IPV4_TCP, MAC_QINQ_IPV6_UDP, MAC_QINQ_IPV6_TCP.
+* Enable QINQ switch filter for IPv4/IPv6, IPv4 + TCP/UDP in non-pipeline mode. 
+* Enable QINQ switch filter for IPv6 + TCP/UDP in pipeline mode. 
+CVL support l4 for QinQ switch filter in PF driver is by dst MAC + outer VLAN id + inner VLAN id + dst IP + dst port, and port can support as eth / vlan / vlan / IP / tcp|udp.
+
+Prerequisites
+=============
+
+Hardware
+--------
+Supportted NICs: columbiaville_25g/columbiaville_100g
+
+Software
+--------
+dpdk: http://dpdk.org/git/dpdk
+scapy: http://www.secdev.org/projects/scapy/
+
+General Set Up
+--------------
+1. Copy specific ice package to /lib/firmware/updates/intel/ice/ddp/ice.pkg,
+   then load driver::
+
+    # cp ice_comms-1.3.31.0.pkg /lib/firmware/updates/intel/ice/ddp/ice.pkg
+    # rmmod ice
+    # insmod ice.ko
+
+2. Compile DPDK::
+
+    # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib --default-library=static x86_64-native-linuxapp-gcc
+    # ninja -C x86_64-native-linuxapp-gcc -j 110
+
+3. Get the pci device id and interface of DUT and tester::
+
+    # ./usertools/dpdk-devbind.py -s
+
+    0000:3b:00.0 'Ethernet Controller E810-C for SFP 1593' if=ens785f0 drv=ice unused=vfio-pci
+    0000:af:00.0 'Ethernet Controller XXV710 for 25GbE SFP28 158b' if=ens260f0 drv=i40e unused=vfio-pci
+
+4. Bind the DUT port to dpdk::
+
+    # ./usertools/dpdk-devbind.py -b vfio-pci 0000:3b:00.0
+    
+Test Case
+=========
+
+Common Steps
+------------
+1. Launch the userland ``testpmd`` application on DUT as follows::
+
+     # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:3b:00.0 -- -i --txq=16 --rxq=16
+
+2. Set verbose::
+    
+     testpmd> set verbose 1
+    
+3. Set fwd engine and start::
+
+     testpmd> set fwd rxonly
+     testpmd> start
+
+#Non-pipeline mode
+
+Test Case 1: MAC_QINQ_IPV4
+--------------------------
+The test case enable QINQ switch filter for IPv4 in non-pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv4.
+
+Test Steps
+~~~~~~~~~~
+1. Validate a rule::
+   
+     testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions queue index 2 / end
+
+   Get the message::
+
+     Flow rule validated
+
+2. Create a rule and list rules::
+
+     testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions queue index 2 / end
+     
+   Get the message::
+
+     Flow rule #0 created
+   
+3. Check the flow list::
+
+     testpmd> flow list 0
+
+   ID      Group   Prio    Attr    Rule
+   0       0       0       i--     ETH VLAN VLAN IPV4 => QUEUE
+
+4. Send matched packet in scapy on tester, check the DUT received this packet and the action is right.
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/("X"*80)],iface="ens260f0",count=1)
+
+DUT::
+
+    testpmd> port 0/queue 2: received 1 packets
+  src=A4:BF:01:4D:6F:32 - dst=00:11:22:33:44:55 - type=0x8100 - length=122 - nb_segs=1 - RSS hash=0x26878aad - RSS queue=0x2 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - Receive queue=0x2
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+5. Send mismatched packet in scapy on tester, check the DUT received this packet and the action is not right.
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/("X"*80)],iface="ens260f0",count=1)
+    
+DUT::
+    
+    testpmd> port 0/queue 13: received 1 packets
+  src=A4:BF:01:4D:6F:32 - dst=00:11:22:33:44:33 - type=0x8100 - length=122 - nb_segs=1 - RSS hash=0x26878aad - RSS queue=0xd - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - Receive queue=0xd
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/("X"*80)],iface="ens260f0",count=1)
+
+DUT::  
+  
+   testpmd> port 0/queue 13: received 1 packets
+  src=A4:BF:01:4D:6F:32 - dst=00:11:22:33:44:55 - type=0x8100 - length=122 - nb_segs=1 - RSS hash=0x26878aad - RSS queue=0xd - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - Receive queue=0xd
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/("X"*80)],iface="ens260f0",count=1)
+
+DUT:: 
+
+   testpmd> port 0/queue 13: received 1 packets
+  src=A4:BF:01:4D:6F:32 - dst=00:11:22:33:44:55 - type=0x8100 - length=122 - nb_segs=1 - RSS hash=0x26878aad - RSS queue=0xd - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - Receive queue=0xd
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.2")/("X"*80)],iface="ens260f0",count=1)
+
+DUT:: 
+
+   testpmd> port 0/queue 10: received 1 packets
+  src=A4:BF:01:4D:6F:32 - dst=00:11:22:33:44:55 - type=0x8100 - length=122 - nb_segs=1 - RSS hash=0xc99a75ba - RSS queue=0xa - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - Receive queue=0xa
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+6. Destroy a rule and list rules::
+
+     testpmd> flow destroy 0 rule 0
+  
+   Get the message::
+
+     Flow rule #0 destroyed
+
+7. Check the flow list::
+
+     testpmd> flow list 0
+
+   Check the rule not exists in the list.
+   Send matched packets in step 4, check the action is not right.
+
+Test Case 2: MAC_QINQ_IPV6
+--------------------------
+The test case enable QINQ switch filter for IPv6 in non-pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv6.
+
+Test Steps
+~~~~~~~~~~
+1. Validate a rule::
+   
+     testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions rss queues 2 3 end / end
+
+   Get the message::
+
+     Flow rule validated
+
+2. Create a rule and list rules::
+
+     testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions rss queues 2 3 end / end
+
+   Get the message::
+
+     Flow rule #0 created
+   
+3. Check the flow list::
+
+     testpmd> flow list 0
+
+   ID      Group   Prio    Attr    Rule
+   0       0       0       i--     ETH VLAN VLAN IPV6 => RSS
+
+4. Send matched packet in scapy on tester, check the DUT received this packet and the action is right.
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*80)],iface="ens260f0",count=1)
+
+DUT::
+
+    testpmd> port 0/queue 2: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 - nb_segs=1 - RSS hash=0xb0c13d2c - RSS queue=0x2 - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - Receive queue=0x2
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+5. Send mismatched packet in scapy on tester, check the DUT received this packet and the action is not right.
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*80)],iface="ens260f0",count=1)
+    
+DUT::
+  
+    testpmd> port 0/queue 12: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:33 - type=0x8100 - length=142 - nb_segs=1 - RSS hash=0xb0c13d2c - RSS queue=0xc - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - Receive queue=0xc
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*80)],iface="ens260f0",count=1)
+
+DUT::  
+  
+   testpmd> port 0/queue 12: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 - nb_segs=1 - RSS hash=0xb0c13d2c - RSS queue=0xc - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - Receive queue=0xc
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*80)],iface="ens260f0",count=1)
+
+DUT:: 
+ 
+   testpmd> port 0/queue 12: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 - nb_segs=1 - RSS hash=0xb0c13d2c - RSS queue=0xc - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - Receive queue=0xc
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+  
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/("X"*80)],iface="ens260f0",count=1)
+
+DUT:: 
+
+   testpmd> port 0/queue 6: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 - nb_segs=1 - RSS hash=0x63517896 - RSS queue=0x6 - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - Receive queue=0x6
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+6. Destroy a rule and list rules::
+
+     testpmd> flow destroy 0 rule 0
+  
+   Get the message::
+
+     Flow rule #0 destroyed
+
+7. Check the flow list::
+
+     testpmd> flow list 0
+
+   Check the rule not exists in the list.
+   Send matched packets in step 4, check the action is not right.
+
+Test Case 3: MAC_QINQ_IPV4_UDP
+------------------------------
+The test case enable QINQ switch filter for IPv4 + UDP in non-pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv4 + UDP.
+
+Test Steps
+~~~~~~~~~~
+1. Validate a rule::
+   
+     testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv4 / udp src is 50 dst is 23 / end actions queue index 2 / end
+
+   Get the message::
+
+     Flow rule validated
+
+2. Create a rule and list rules::
+
+     testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv4 / udp src is 50 dst is 23 / end actions queue index 2 / end
+     
+   Get the message::
+
+     Flow rule #0 created
+   
+3. Check the flow list::
+
+     testpmd> flow list 0
+
+   ID      Group   Prio    Attr    Rule
+   0       0       0       i--     ETH VLAN VLAN IPV4 UDP => QUEUE
+
+4. Send matched packet in scapy on tester, check the DUT received this packet and the action is right.
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP()/UDP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
+
+DUT::
+
+    testpmd> port 0/queue 2: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=130 - nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x2 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_UDP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x2
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+5. Send mismatched packet in scapy on tester, check the DUT received this packet and the action is not right.
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP()/UDP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
+    
+DUT::
+    
+    testpmd> port 0/queue 3: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:33 - type=0x8100 - length=130 - nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_UDP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x3
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP()/UDP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
+
+DUT::  
+  
+   testpmd> port 0/queue 3: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=130 - nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_UDP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x3
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x0800)/IP()/UDP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
+
+DUT:: 
+
+   testpmd> port 0/queue 3: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=130 - nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_UDP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x3
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP()/UDP(sport=50,dport=22)/("X"*80)],iface="ens260f0",count=1)
+
+DUT:: 
+
+   testpmd> port 0/queue 3: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=130 - nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_UDP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=8 - Receive queue=0x3
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+6. Destroy a rule and list rules::
+
+     testpmd> flow destroy 0 rule 0
+  
+   Get the message::
+
+     Flow rule #0 destroyed
+
+7. Check the flow list::
+
+     testpmd> flow list 0
+
+   Check the rule not exists in the list.
+   Send matched packets in step 4, check the action is not right.
+
+Test Case 4: MAC_QINQ_IPV4_TCP
+------------------------------
+The test case enable QINQ switch filter for IPv4 + TCP in non-pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv4 + TCP.
+
+Test Steps
+~~~~~~~~~~
+1. Validate a rule::
+   
+     testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv4 / tcp src is 50 dst is 23 / end actions rss queues 4 5 end / end
+
+   Get the message::
+
+     Flow rule validated
+
+2. Create a rule and list rules::
+
+     testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv4 / tcp src is 50 dst is 23 / end actions rss queues 4 5 end / end
+     
+   Get the message::
+
+     Flow rule #0 created
+   
+3. Check the flow list::
+
+     testpmd> flow list 0
+
+   ID      Group   Prio    Attr    Rule
+   0       0       0       i--     ETH VLAN VLAN IPV4 TCP => RSS
+
+4. Send matched packet in scapy on tester, check the DUT received this packet and the action is right.
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP()/TCP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
+
+DUT::
+
+    testpmd> port 0/queue 5: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 - nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x5 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_TCP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=20 - Receive queue=0x5
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+5. Send mismatched packet in scapy on tester, check the DUT received this packet and the action is not right.
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP()/TCP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
+    
+DUT::
+    
+    testpmd> port 0/queue 3: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:33 - type=0x8100 - length=142 - nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_TCP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=20 - Receive queue=0x3
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP()/TCP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
+
+DUT::  
+  
+   testpmd> port 0/queue 3: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 - nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_TCP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=20 - Receive queue=0x3
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x0800)/IP()/TCP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
+
+DUT:: 
+
+   testpmd> port 0/queue 3: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 - nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_TCP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=20 - Receive queue=0x3
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x0800)/IP()/TCP(sport=50,dport=22)/("X"*80)],iface="ens260f0",count=1)
+
+DUT:: 
+
+   testpmd> port 0/queue 3: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=142 - nb_segs=1 - RSS hash=0xddc4fdb3 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV4 INNER_L4_TCP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=20 - inner_l4_len=20 - Receive queue=0x3
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+6. Destroy a rule and list rules::
+
+     testpmd> flow destroy 0 rule 0
+  
+   Get the message::
+
+     Flow rule #0 destroyed
+
+7. Check the flow list::
+
+     testpmd> flow list 0
+
+   Check the rule not exists in the list.
+   Send matched packets in step 4, check the action is not right.
+
+#Pipeline mode
+
+Test Case 5: MAC_QINQ_IPV6_UDP
+------------------------------
+The test case enable QINQ switch filter for IPv6 + UDP in pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv6 + UDP.
+
+Test Steps
+~~~~~~~~~~
+1. Validate a rule::
+   
+     testpmd> flow validate 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / udp src is 50 dst is 23 / end actions drop / end
+
+   Get the message::
+
+     Flow rule validated
+
+2. Create a rule and list rules::
+
+     testpmd> flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / udp src is 50 dst is 23 / end actions drop / end
+
+   Get the message::
+
+     Flow rule #0 created
+   
+3. Check the flow list::
+
+     testpmd> flow list 0
+
+   ID      Group   Prio    Attr    Rule
+   0       0       0       i--     ETH VLAN VLAN IPV6 UDP => DROP
+
+4. Send matched packet in scapy on tester, check the DUT received this packet and the action is right.
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
+
+DUT::
+
+    testpmd> 
+
+5. Send mismatched packet in scapy on tester, check the DUT received this packet and the action is not right.
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
+    
+DUT::
+  
+    testpmd> port 0/queue 15: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:33 - type=0x8100 - length=150 - nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_UDP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=8 - Receive queue=0xf
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
+
+DUT::  
+  
+   testpmd> port 0/queue 15: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=150 - nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_UDP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=8 - Receive queue=0xf
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
+
+DUT:: 
+ 
+   testpmd> port 0/queue 15: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=150 - nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_UDP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=8 - Receive queue=0xf
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+  
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=50,dport=22)/("X"*80)],iface="ens260f0",count=1)
+
+DUT:: 
+
+   testpmd> port 0/queue 15: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=150 - nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_UDP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=8 - Receive queue=0xf
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+6. Destroy a rule and list rules::
+
+     testpmd> flow destroy 0 rule 0
+  
+   Get the message::
+
+     Flow rule #0 destroyed
+
+7. Check the flow list::
+
+     testpmd> flow list 0
+
+   Check the rule not exists in the list.
+   Send matched packets in step 4, check the action is not right.
+
+Test Case 6: MAC_QINQ_IPV6_TCP
+------------------------------
+The test case enable QINQ switch filter for IPv6 + TCP in pipeline mode, and port can support as dst MAC + outer VLAN id + inner VLAN id + IPv6 + TCP.
+
+Test Steps
+~~~~~~~~~~
+1. Validate a rule::
+   
+     testpmd> flow validate 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / tcp src is 50 dst is 23 / end actions queue index 7 / end
+
+   Get the message::
+
+     Flow rule validated
+
+2. Create a rule and list rules::
+
+     testpmd> flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 2 / vlan tci is 1 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / tcp src is 50 dst is 23 / end actions queue index 7 / end
+
+   Get the message::
+
+     Flow rule #0 created
+   
+3. Check the flow list::
+
+     testpmd> flow list 0
+
+   ID      Group   Prio    Attr    Rule
+   0       0       0       i--     ETH VLAN VLAN IPV6 TCP => QUEUE
+
+4. Send matched packet in scapy on tester, check the DUT received this packet and the action is right.
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
+
+DUT::
+
+    testpmd> port 0/queue 7: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=162 - nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0x7 - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_TCP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=20 - Receive queue=0x7
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+5. Send mismatched packet in scapy on tester, check the DUT received this packet and the action is not right.
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:33",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
+    
+DUT::
+  
+    testpmd> port 0/queue 15: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:33 - type=0x8100 - length=162 - nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_TCP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=20 - Receive queue=0xf
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
+
+DUT::  
+  
+   testpmd> port 0/queue 15: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=162 - nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_TCP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=20 - Receive queue=0xf
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x2,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=50,dport=23)/("X"*80)],iface="ens260f0",count=1)
+
+DUT:: 
+ 
+   testpmd> port 0/queue 15: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=162 - nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_TCP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=20 - Receive queue=0xf
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+  
+Tester::
+
+    >>> sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8100)/Dot1Q(vlan=0x1,type=0x86DD)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=50,dport=22)/("X"*80)],iface="ens260f0",count=1)
+
+DUT:: 
+
+   testpmd> port 0/queue 15: received 1 packets
+  src=00:00:00:00:00:00 - dst=00:11:22:33:44:55 - type=0x8100 - length=162 - nb_segs=1 - RSS hash=0xc5dfbe3f - RSS queue=0xf - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_TCP  - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN INNER_L3_IPV6 INNER_L4_TCP  - l2_len=18 - inner_l2_len=4 - inner_l3_len=40 - inner_l4_len=20 - Receive queue=0xf
+  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+
+6. Destroy a rule and list rules::
+
+     testpmd> flow destroy 0 rule 0
+  
+   Get the message::
+
+     Flow rule #0 destroyed
+
+7. Check the flow list::
+
+     testpmd> flow list 0
+
+   Check the rule not exists in the list.
+   Send matched packets in step 4, check the action is not right.
+
+