test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V1 1/2] test_plans/generic_flow_api: add ixgbe new cases
@ 2023-04-20  8:03 Lingli Chen
  2023-04-20  8:03 ` [dts][PATCH V1 2/2] tests/generic_flow_api: " Lingli Chen
  0 siblings, 1 reply; 5+ messages in thread
From: Lingli Chen @ 2023-04-20  8:03 UTC (permalink / raw)
  To: dts; +Cc: yuan.peng, Lingli Chen

add ixgbe fdir for ipv6/ipv4 mask case

Signed-off-by: Yuan Peng <yuan.peng@intel.com>
Signed-off-by: Lingli Chen <linglix.chen@intel.com>
---
 test_plans/generic_flow_api_test_plan.rst | 92 +++++++++++++++++++++++
 1 file changed, 92 insertions(+)

diff --git a/test_plans/generic_flow_api_test_plan.rst b/test_plans/generic_flow_api_test_plan.rst
index 28eb4902..2719a4d5 100644
--- a/test_plans/generic_flow_api_test_plan.rst
+++ b/test_plans/generic_flow_api_test_plan.rst
@@ -2520,3 +2520,95 @@ Send packets(`dst_ip` = 2.2.2.5 `src_ip` = 2.2.2.4 `dst_port` = 1 `src_port` =
 sending packets. packets are received on the queue 32 and queue 63 When
 setting 5-tuple Filter with queue(64), it will display failure because the
 number of queues no more than 64.
+
+Test case: IXGBE fdir for ipv6 mask
+===================================
+
+#. Launch the app ``testpmd`` with the following arguments::
+
+    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 1ffff -n 4 -- -i --rxq=16 --txq=16 --nb-cores=16 --disable-rss
+    testpmd> set fwd rxonly
+    testpmd> set verbose 1
+    testpmd> start
+
+Subcase1: fdir for ipv6 dst mask
+--------------------------------
+1. create a dst mask rule on port 0::
+
+    flow create 0 ingress pattern fuzzy thresh spec 1 thresh mask 1 / ipv6 dst spec 2001::64 dst mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff / end actions queue index 2 / end
+
+2. send matched packet::
+
+    p1=Ether(dst="00:11:22:33:44:55")/IPv6(src="2001::3", dst="2001::64")/Raw('x' * 20)
+
+Check the packets are directed to queue 2.
+
+3. send unmatched packet::
+
+    p2=Ether(dst="00:11:22:33:44:55")/IPv6(src="2001::3", dst="2001::63")/Raw('x' * 20)
+
+Check the packet is directed to queue 0.
+
+Subcase2: fdir for ipv6 src mask
+--------------------------------
+1. create a src mask rule on port 0::
+
+    flow create 0 ingress pattern fuzzy thresh spec 1 thresh mask 1 / ipv6 src spec 2001::63 src mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff / end actions queue index 1 / end
+
+2. send matched packet::
+
+    p3=Ether(dst="00:11:22:33:44:55")/IPv6(src="2001::63", dst="2001::64")/Raw('x' * 20)
+
+Check the packets are directed to queue 1.
+
+3. send unmatched packet::
+
+    p4=Ether(dst="00:11:22:33:44:55")/IPv6(src="2001::3", dst="2001::64")/Raw('x' * 20)
+
+Check the packet is directed to queue 0
+
+Test case: IXGBE fdir for ipv4 mask
+===================================
+
+#. Launch the app ``testpmd`` with the following arguments::
+
+    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 1ffff -n 4 -- -i --rxq=16 --txq=16 --nb-cores=16 --disable-rss
+    testpmd> set fwd rxonly
+    testpmd> set verbose 1
+    testpmd> start
+
+Subcase1: fdir for ipv4 dst mask
+--------------------------------
+1. create a dst mask rule on port 0::
+
+    flow create 0 ingress pattern fuzzy thresh spec 1 thresh mask 1 / eth / ipv4 dst spec 100.0.0.5 dst mask 255.255.255.255 / end actions queue index 3 / end
+
+2. send matched packet::
+
+    p1=Ether(dst="00:11:22:33:44:55")/IP(dst="100.0.0.5", src="192.168.0.1")/Raw('x' * 20)
+
+Check the packets are directed to queue 3.
+
+3. send unmatched packet::
+
+    p2=Ether(dst="00:11:22:33:44:55")/IP(dst="100.0.0.6", src="192.168.0.1")/Raw('x' * 20)
+
+Check the packet is directed to queue 0.
+
+Subcase2: fdir for ipv4 src mask
+--------------------------------
+1. create a src mask rule on port 0::
+
+    flow create 0 ingress pattern fuzzy thresh spec 1 thresh mask 1 / eth / ipv4 src spec 100.0.0.5 src mask 255.255.255.255 / end actions queue index 3 / end
+
+2. send matched packet::
+
+    p3=Ether(dst="00:11:22:33:44:55")/IP(src="100.0.0.5", dst="192.168.0.1")/Raw('x' * 20)
+
+Check the packets are directed to queue 3.
+
+3. send unmatched packet::
+
+    p4=Ether(dst="00:11:22:33:44:55")/IP(src="100.0.0.6", dst="192.168.0.1")/Raw('x' * 20)
+
+Check the packet is directed to queue 0.
\ No newline at end of file
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dts][PATCH V1 2/2] tests/generic_flow_api: add ixgbe new cases
  2023-04-20  8:03 [dts][PATCH V1 1/2] test_plans/generic_flow_api: add ixgbe new cases Lingli Chen
@ 2023-04-20  8:03 ` Lingli Chen
  2023-04-20  9:32   ` Peng, Yuan
  2023-04-26  3:03   ` lijuan.tu
  0 siblings, 2 replies; 5+ messages in thread
From: Lingli Chen @ 2023-04-20  8:03 UTC (permalink / raw)
  To: dts; +Cc: yuan.peng, Lingli Chen

add ixgbe fdir for ipv6/ipv4 mask test cases

Signed-off-by: Lingli Chen <linglix.chen@intel.com>
---
 tests/TestSuite_generic_flow_api.py | 126 ++++++++++++++++++++++++++++
 1 file changed, 126 insertions(+)

diff --git a/tests/TestSuite_generic_flow_api.py b/tests/TestSuite_generic_flow_api.py
index 9fadff63..b0d0eb44 100644
--- a/tests/TestSuite_generic_flow_api.py
+++ b/tests/TestSuite_generic_flow_api.py
@@ -5899,6 +5899,132 @@ class TestGeneric_flow_api(TestCase):
         else:
             self.verify(False, "%s not support this test" % self.nic)
 
+    def launch_testpmd(self):
+        """
+        launch testpmd for IXGBE fdir mask test
+        """
+        self.pmdout.start_testpmd(
+            "all",
+            "--rxq=%d --txq=%d --nb-cores=%d --disable-rss"
+            % (MAX_QUEUE + 1, MAX_QUEUE + 1, MAX_QUEUE + 1),
+        )
+        self.dut.send_expect("set fwd rxonly", "testpmd> ")
+        self.dut.send_expect("set verbose 1", "testpmd> ")
+        self.dut.send_expect("start", "testpmd> ")
+        self.pmdout.wait_link_status_up("all")
+
+    @check_supported_nic("IXGBE_10G-82599_SFP")
+    def test_fdir_for_ipv6_dst_mask(self):
+        """
+        only supported by ixgbe
+        """
+        self.launch_testpmd()
+
+        self.dut.send_expect(
+            "flow create 0 ingress pattern fuzzy thresh spec 1 thresh mask 1 / ipv6 dst spec 2001::64 dst mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff / end actions queue index 2 / end",
+            "created",
+        )
+        # send the packets and verify the results
+        self.sendpkt(
+            pktstr="""Ether(dst="00:11:22:33:44:55")/IPv6(src="2001::3", dst="2001::64")/Raw('x' * 20)"""
+        )
+
+        self.verify_result(
+            "pf", expect_rxpkts="1", expect_queue="2", verify_mac="00:11:22:33:44:55"
+        )
+
+        self.sendpkt(
+            pktstr="""Ether(dst="00:11:22:33:44:55")/IPv6(src="2001::3", dst="2001::63")/Raw('x' * 20)"""
+        )
+
+        self.verify_result(
+            "pf", expect_rxpkts="1", expect_queue="0", verify_mac="00:11:22:33:44:55"
+        )
+
+    @check_supported_nic("IXGBE_10G-82599_SFP")
+    def test_fdir_for_ipv6_src_mask(self):
+        """
+        only supported by ixgbe
+        """
+        self.launch_testpmd()
+
+        self.dut.send_expect(
+            "flow create 0 ingress pattern fuzzy thresh spec 1 thresh mask 1 / ipv6 src spec 2001::63 src mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff / end actions queue index 1 / end",
+            "created",
+        )
+        # send the packets and verify the results
+        self.sendpkt(
+            pktstr="""Ether(dst="00:11:22:33:44:55")/IPv6(src="2001::63", dst="2001::64")/Raw('x' * 20)"""
+        )
+
+        self.verify_result(
+            "pf", expect_rxpkts="1", expect_queue="1", verify_mac="00:11:22:33:44:55"
+        )
+
+        self.sendpkt(
+            pktstr="""Ether(dst="00:11:22:33:44:55")/IPv6(src="2001::3", dst="2001::64")/Raw('x' * 20)"""
+        )
+
+        self.verify_result(
+            "pf", expect_rxpkts="1", expect_queue="0", verify_mac="00:11:22:33:44:55"
+        )
+
+    @check_supported_nic("IXGBE_10G-82599_SFP")
+    def test_fdir_for_ipv4_dst_mask(self):
+        """
+        only supported by ixgbe
+        """
+        self.launch_testpmd()
+
+        self.dut.send_expect(
+            "flow create 0 ingress pattern fuzzy thresh spec 1 thresh mask 1 / eth / ipv4 dst spec 100.0.0.5 dst mask 255.255.255.255 / end actions queue index 3 / end",
+            "created",
+        )
+        # send the packets and verify the results
+        self.sendpkt(
+            pktstr="""Ether(dst="00:11:22:33:44:55")/IP(dst="100.0.0.5", src="192.168.0.1")/Raw('x' * 20)"""
+        )
+
+        self.verify_result(
+            "pf", expect_rxpkts="1", expect_queue="3", verify_mac="00:11:22:33:44:55"
+        )
+
+        self.sendpkt(
+            pktstr="""Ether(dst="00:11:22:33:44:55")/IP(dst="100.0.0.6", src="192.168.0.1")/Raw('x' * 20)"""
+        )
+
+        self.verify_result(
+            "pf", expect_rxpkts="1", expect_queue="0", verify_mac="00:11:22:33:44:55"
+        )
+
+    @check_supported_nic("IXGBE_10G-82599_SFP")
+    def test_fdir_for_ipv4_src_mask(self):
+        """
+        only supported by ixgbe
+        """
+        self.launch_testpmd()
+
+        self.dut.send_expect(
+            "flow create 0 ingress pattern fuzzy thresh spec 1 thresh mask 1 / eth / ipv4 src spec 100.0.0.5 src mask 255.255.255.255 / end actions queue index 3 / end",
+            "created",
+        )
+        # send the packets and verify the results
+        self.sendpkt(
+            pktstr="""Ether(dst="00:11:22:33:44:55")/IP(src="100.0.0.5", dst="192.168.0.1")/Raw('x' * 20)"""
+        )
+
+        self.verify_result(
+            "pf", expect_rxpkts="1", expect_queue="3", verify_mac="00:11:22:33:44:55"
+        )
+
+        self.sendpkt(
+            pktstr="""Ether(dst="00:11:22:33:44:55")/IP(src="100.0.0.6", dst="192.168.0.1")/Raw('x' * 20)"""
+        )
+
+        self.verify_result(
+            "pf", expect_rxpkts="1", expect_queue="0", verify_mac="00:11:22:33:44:55"
+        )
+
     def tear_down(self):
         """
         Run after each test case.
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [dts][PATCH V1 2/2] tests/generic_flow_api: add ixgbe new cases
  2023-04-20  8:03 ` [dts][PATCH V1 2/2] tests/generic_flow_api: " Lingli Chen
@ 2023-04-20  9:32   ` Peng, Yuan
  2023-04-21  2:24     ` Li, WeiyuanX
  2023-04-26  3:03   ` lijuan.tu
  1 sibling, 1 reply; 5+ messages in thread
From: Peng, Yuan @ 2023-04-20  9:32 UTC (permalink / raw)
  To: Chen, LingliX, dts



> -----Original Message-----
> From: Chen, LingliX <linglix.chen@intel.com>
> Sent: Thursday, April 20, 2023 4:04 PM
> To: dts@dpdk.org
> Cc: Peng, Yuan <yuan.peng@intel.com>; Chen, LingliX
> <linglix.chen@intel.com>
> Subject: [dts][PATCH V1 2/2] tests/generic_flow_api: add ixgbe new cases
> 
> add ixgbe fdir for ipv6/ipv4 mask test cases
> 
> Signed-off-by: Lingli Chen <linglix.chen@intel.com>
> ---

Acked-by: Yuan Peng <yuan.peng@intel.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [dts][PATCH V1 2/2] tests/generic_flow_api: add ixgbe new cases
  2023-04-20  9:32   ` Peng, Yuan
@ 2023-04-21  2:24     ` Li, WeiyuanX
  0 siblings, 0 replies; 5+ messages in thread
From: Li, WeiyuanX @ 2023-04-21  2:24 UTC (permalink / raw)
  To: Peng, Yuan, Chen, LingliX, dts

> -----Original Message-----
> From: Peng, Yuan <yuan.peng@intel.com>
> Sent: Thursday, April 20, 2023 5:33 PM
> To: Chen, LingliX <linglix.chen@intel.com>; dts@dpdk.org
> Subject: RE: [dts][PATCH V1 2/2] tests/generic_flow_api: add ixgbe new
> cases
> 
> 
> 
> > -----Original Message-----
> > From: Chen, LingliX <linglix.chen@intel.com>
> > Sent: Thursday, April 20, 2023 4:04 PM
> > To: dts@dpdk.org
> > Cc: Peng, Yuan <yuan.peng@intel.com>; Chen, LingliX
> > <linglix.chen@intel.com>
> > Subject: [dts][PATCH V1 2/2] tests/generic_flow_api: add ixgbe new
> > cases
> >
> > add ixgbe fdir for ipv6/ipv4 mask test cases
> >
> > Signed-off-by: Lingli Chen <linglix.chen@intel.com>
> > ---
> 
> Acked-by: Yuan Peng <yuan.peng@intel.com>
Tested-by: Weiyuan Li <weiyuanx.li@intel.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dts][PATCH V1 2/2] tests/generic_flow_api: add ixgbe new cases
  2023-04-20  8:03 ` [dts][PATCH V1 2/2] tests/generic_flow_api: " Lingli Chen
  2023-04-20  9:32   ` Peng, Yuan
@ 2023-04-26  3:03   ` lijuan.tu
  1 sibling, 0 replies; 5+ messages in thread
From: lijuan.tu @ 2023-04-26  3:03 UTC (permalink / raw)
  To: dts, Lingli Chen; +Cc: yuan.peng, Lingli Chen

On Thu, 20 Apr 2023 04:03:49 -0400, Lingli Chen <linglix.chen@intel.com> wrote:
> add ixgbe fdir for ipv6/ipv4 mask test cases
> 
> Signed-off-by: Lingli Chen <linglix.chen@intel.com>


Series applied, thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-04-26  3:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-20  8:03 [dts][PATCH V1 1/2] test_plans/generic_flow_api: add ixgbe new cases Lingli Chen
2023-04-20  8:03 ` [dts][PATCH V1 2/2] tests/generic_flow_api: " Lingli Chen
2023-04-20  9:32   ` Peng, Yuan
2023-04-21  2:24     ` Li, WeiyuanX
2023-04-26  3:03   ` lijuan.tu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).