[V1] ice_advanced_iavf_rss_gtpu:add new case about disable rss

Message ID 20220624103709.6677-1-zhiminx.huang@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] ice_advanced_iavf_rss_gtpu:add new case about disable rss |

Checks

Context Check Description
ci/Intel-dts-format-test success Testing OK
ci/Intel-dts-pylama-test success Testing OK
ci/Intel-dts-doc-test success Testing OK
ci/Intel-dts-suite-test success Testing OK

Commit Message

Huang, ZhiminX June 24, 2022, 10:37 a.m. UTC
  vf rss gtpu miss a testcase about rss function when disable rss.
so add new case in testcase and testplan.

Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
 .../ice_advanced_iavf_rss_gtpu_test_plan.rst  | 15 ++++++++++
 tests/TestSuite_ice_advanced_iavf_rss_gtpu.py | 28 +++++++++++++++++++
 2 files changed, 43 insertions(+)
  

Comments

Tu, Lijuan June 29, 2022, 1:47 a.m. UTC | #1
On Fri, 24 Jun 2022 18:37:09 +0800, Zhimin Huang <zhiminx.huang@intel.com> wrote:
> vf rss gtpu miss a testcase about rss function when disable rss.
> so add new case in testcase and testplan.
> 
> Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>


Applied, thanks
  

Patch

diff --git a/test_plans/ice_advanced_iavf_rss_gtpu_test_plan.rst b/test_plans/ice_advanced_iavf_rss_gtpu_test_plan.rst
index 69782f05..f04b6017 100644
--- a/test_plans/ice_advanced_iavf_rss_gtpu_test_plan.rst
+++ b/test_plans/ice_advanced_iavf_rss_gtpu_test_plan.rst
@@ -4096,6 +4096,21 @@  so the following step don't need to be run.
 
 10. repeat step 5, check the rule without UL/DL can't work now.
 
+rss function when disable rss
+=============================
+1. start testpmd without disable rss::
+
+    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xff -n 4 -- -i --rxq=16 --txq=16 --rxd=384 --txd=384 --disable-rss
+
+2. create a IPV4_GTPU_EH_IPV4 rule::
+
+    flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / udp / end actions rss types ipv4-udp end key_len 0 queues end / end
+
+3. send 1280 packets of IPV4_GTPU_EH_IPV4 packet type::
+
+    sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(dst=RandIP(),src=RandIP())/UDP(sport=RandShort(),dport=RandShort())/("X"*480)],iface="enp216s0f0",count=1280)
+
+4. check all the packets have hash value and distributed to all queues by RSS.
 
 stress case
 ===========
diff --git a/tests/TestSuite_ice_advanced_iavf_rss_gtpu.py b/tests/TestSuite_ice_advanced_iavf_rss_gtpu.py
index 040199f4..9577fbfe 100644
--- a/tests/TestSuite_ice_advanced_iavf_rss_gtpu.py
+++ b/tests/TestSuite_ice_advanced_iavf_rss_gtpu.py
@@ -9666,6 +9666,34 @@  class TestICEAdvancedIAVFRSSGTPU(TestCase):
         )
         self.pmd_output.execute_cmd("flow flush 0")
 
+    def test_rss_function_when_disable_rss(self):
+        self.pmd_output.quit()
+        self.pmd_output.start_testpmd(
+            cores="1S/4C/1T",
+            param="--rxq=16 --txq=16 --disable-rss --rxd=384 --txd=384",
+            eal_param=f"-a {self.vf0_pci}",
+            socket=self.ports_socket,
+        )
+        self.pmd_output.execute_cmd("set fwd rxonly")
+        self.pmd_output.execute_cmd("set verbose 1")
+        self.pmd_output.execute_cmd("start")
+        res = self.pmd_output.wait_link_status_up("all", timeout=15)
+        self.verify(res is True, "there have port link is down")
+        rule = "flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / udp / end actions rss types ipv4-udp end key_len 0 queues end / end"
+        self.rssprocess.create_rule(rule=rule)
+        pkt = 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst=RandIP(),src=RandIP())/UDP(sport=RandShort(),dport=RandShort())/("X"*480)'
+        output = self.rssprocess.send_pkt_get_output(pkts=pkt, count=1280)
+        _, queues = self.rssprocess.get_hash_and_queues(output)
+        hashes, rss_distribute = self.rssprocess.get_hash_verify_rss_distribute(output)
+        self.verify(
+            len(hashes) == 1280,
+            "all the packets should have hash value and distributed to all queues by RSS.",
+        )
+        self.verify(
+            len(set(queues)) == 16, "all the packets have distributed to all queues"
+        )
+        self.verify(rss_distribute, "the packet do not distribute by rss")
+
     # vf rss gtpc gtpu
     def test_mac_ipv4_gtpu(self):
         self.switch_testpmd(symmetric=False)