diff mbox series

[1/2] tests/rxtx_offload: adapt to CVL NIC

Message ID 20210324112443.29319-2-weix.xie@intel.com (mailing list archive)
State Changes Requested
Headers show
Series adapt to CVL NIC | expand

Commit Message

Xie, WeiX March 24, 2021, 11:24 a.m. UTC
for CVL NIC,
a.rxtx_offload/rxoffload_port: disable jumboframe per-queue will change the RSS key, then pkt can be distributed to queues by RSS.
b.rxtx_offload/txoffload_queue: it failed to enable mbuf_fast_free per_queue.

Signed-off-by: xiewei <weix.xie@intel.com>
---
 tests/TestSuite_rxtx_offload.py | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/tests/TestSuite_rxtx_offload.py b/tests/TestSuite_rxtx_offload.py
index 0e70526f..f7481089 100644
--- a/tests/TestSuite_rxtx_offload.py
+++ b/tests/TestSuite_rxtx_offload.py
@@ -314,7 +314,10 @@  class TestRxTx_Offload(TestCase):
             scanner = re.compile(result_scanner, re.DOTALL)
             m = scanner.search(outstring)
             queue_id = m.group(1)
-            self.verify(int(expect_queue) == int(queue_id), "the offload setting doesn't take effect.")
+            if self.nic in ['columbiaville_25g', 'columbiaville_100g']:
+                self.verify(int(queue_id) in [0, 1, 2, 3], "the offload setting doesn't take effect.")
+            else:
+                self.verify(int(expect_queue) == int(queue_id), "the offload setting doesn't take effect.")
 
     def start_tcpdump(self, rxItf):
 
@@ -346,10 +349,16 @@  class TestRxTx_Offload(TestCase):
         pkt2_queue = self.get_queue_number(self.jumbo_pkt2)
 
         # Failed to disable jumboframe per_queue, foxvillee 2.5g not support
-        if self.nic != 'foxville':
+        if self.nic in ['columbiaville_25g', 'columbiaville_100g']:
             self.dut.send_expect("port stop 0", "testpmd> ")
-            self.dut.send_expect("port 0 rxq %s rx_offload jumbo_frame off" % pkt1_queue, "testpmd> ")
+            for i in range(4):
+                self.dut.send_expect("port 0 rxq %s rx_offload jumbo_frame off" % i, "testpmd> ")
             self.verify_result(self.jumbo_pkt1, 1, pkt1_queue)
+        else:
+            if self.nic != 'foxville':
+                self.dut.send_expect("port stop 0", "testpmd> ")
+                self.dut.send_expect("port 0 rxq %s rx_offload jumbo_frame off" % pkt1_queue, "testpmd> ")
+                self.verify_result(self.jumbo_pkt1, 1, pkt1_queue)
 
         # Succeed to disable jumboframe per_port
         self.dut.send_expect("port stop 0", "testpmd> ")
@@ -698,8 +707,12 @@  class TestRxTx_Offload(TestCase):
         self.dut.send_expect("port 0 txq 1 tx_offload mbuf_fast_free on", "testpmd> ")
         self.dut.send_expect("port 0 txq 2 tx_offload mbuf_fast_free on", "testpmd> ")
         self.dut.send_expect("port 0 txq 3 tx_offload mbuf_fast_free on", "testpmd> ")
-        offload = ["mbuf_fast_free", "mbuf_fast_free", "mbuf_fast_free", "mbuf_fast_free"]
-        self.check_queue_config("tx", offload)
+        if self.nic in ['columbiaville_25g', 'columbiaville_100g']:
+            out = self.dut.send_expect("port start 0", "testpmd> ")
+            self.verify("Fail to configure port 0 tx queues" in out, "mbuf_fast_free can be set by queue.")
+        else:
+            offload = ["mbuf_fast_free", "mbuf_fast_free", "mbuf_fast_free", "mbuf_fast_free"]
+            self.check_queue_config("tx", offload)
 
         # Disable mbuf_fast_free per_queue.
         self.dut.send_expect("port stop 0", "testpmd> ")