* [dts][PATCH V2 1/2] test_plans/vf_rss: add new case to test Tx queue number is more than Rx queue number
@ 2023-01-12 4:36 Lingli Chen
2023-01-12 4:36 ` [dts][PATCH V2 2/2] tests/vf_rss: add case test_vf_rss_rxq_txq_inconsistent Lingli Chen
0 siblings, 1 reply; 4+ messages in thread
From: Lingli Chen @ 2023-01-12 4:36 UTC (permalink / raw)
To: dts; +Cc: yuan.peng, Lingli Chen
add new case to cover test Tx queue number is more than Rx queue number
Signed-off-by: Lingli Chen <linglix.chen@intel.com>
---
| 54 +++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
--git a/test_plans/vf_rss_test_plan.rst b/test_plans/vf_rss_test_plan.rst
index 987f71f8..dc3b1da3 100644
--- a/test_plans/vf_rss_test_plan.rst
+++ b/test_plans/vf_rss_test_plan.rst
@@ -168,3 +168,57 @@ Before send packet, config hash reta,512(NICS with kernel driver i40e has 64 ret
after send packet, based on the testpmd output RSS hash value to calculate hash_index, then check whether the
actual receive queue is the queue configured in the reta.
+
+Test case: test rxq txq number inconsistent
+===========================================
+1. Create one VF from kernel PF::
+
+ echo 1 > /sys/bus/pci/devices/0000\:18\:00.0/sriov_numvfs
+
+2. Bind VFs to vfio-pci::
+
+ ./usertools/dpdk-devbind.py -b vfio-pci 18:01.0
+
+3. Start the testpmd with rxq not equal to txq::
+
+ ./<build_target>/app/dpdk-testpmd -l 1-9 -n 2 -- -i --rxq=4 --txq=8 --nb-core=8
+
+.. note::
+ queue pairs in number of 1, 2, 4, 8, 16, 32, 64, etc.
+ For vf of ixgbe, the maximum number of rxq and txq supported is 4.
+
+4. Set rxonly fwd, enable print, start testpmd::
+
+ testpmd> set fwd rxonly
+ testpmd> set verbose 1
+ testpmd> start
+
+5. Send different hash types' packets with different keywords, then check rx port
+ could receive packets by different queues::
+
+ sendp([Ether(dst="00:01:23:45:67:89")/IP(src="192.168.0.4", dst=RandIP())], iface="eth3")
+
+6. Check the total Rx packets in all the RxQ should be equal to the total HW Rx packets::
+
+ testpmd> show fwd stats all
+ ------- Forward Stats for RX Port= 0/Queue= 0 -> TX Port= 0/Queue= 0 -------
+ RX-packets: 252 TX-packets: 0 TX-dropped: 0
+
+ ------- Forward Stats for RX Port= 0/Queue= 1 -> TX Port= 0/Queue= 1 -------
+ RX-packets: 257 TX-packets: 0 TX-dropped: 0
+
+ ------- Forward Stats for RX Port= 0/Queue= 2 -> TX Port= 0/Queue= 2 -------
+ RX-packets: 259 TX-packets: 0 TX-dropped: 0
+
+ ------- Forward Stats for RX Port= 0/Queue= 3 -> TX Port= 0/Queue= 3 -------
+ RX-packets: 256 TX-packets: 0 TX-dropped: 0
+
+ ---------------------- Forward statistics for port 0 ----------------------
+ RX-packets: 1024 RX-dropped: 0 RX-total: 1024
+ TX-packets: 0 TX-dropped: 0 TX-total: 0
+ ----------------------------------------------------------------------------
+
+ +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
+ RX-packets: 1024 RX-dropped: 0 RX-total: 1024
+ TX-packets: 0 TX-dropped: 0 TX-total: 0
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dts][PATCH V2 2/2] tests/vf_rss: add case test_vf_rss_rxq_txq_inconsistent
2023-01-12 4:36 [dts][PATCH V2 1/2] test_plans/vf_rss: add new case to test Tx queue number is more than Rx queue number Lingli Chen
@ 2023-01-12 4:36 ` Lingli Chen
2023-01-12 9:05 ` Peng, Yuan
2023-01-13 2:46 ` lijuan.tu
0 siblings, 2 replies; 4+ messages in thread
From: Lingli Chen @ 2023-01-12 4:36 UTC (permalink / raw)
To: dts; +Cc: yuan.peng, Lingli Chen
add new case to cover Tx queue number is more than Rx queue number
Signed-off-by: Lingli Chen <linglix.chen@intel.com>
---
V2: reformat tests/TestSuite_vf_rss.py
add ixgbe support
conf/test_case_checklist.json | 1 +
| 97 ++++++++++++++++++++++++++++++++---
2 files changed, 90 insertions(+), 8 deletions(-)
diff --git a/conf/test_case_checklist.json b/conf/test_case_checklist.json
index f31daf62..0010a206 100644
--- a/conf/test_case_checklist.json
+++ b/conf/test_case_checklist.json
@@ -1709,6 +1709,7 @@
"IGB_1G-I210_COPPER",
"IXGBE_10G-82599_T3_LOM",
"IXGBE_10G-82599_SFP_SF_QP",
+ "IXGBE_10G-82599_SFP",
"IXGBE_10G-X540T"
],
"Target": [
--git a/tests/TestSuite_vf_rss.py b/tests/TestSuite_vf_rss.py
index a6772baf..2b961ad3 100644
--- a/tests/TestSuite_vf_rss.py
+++ b/tests/TestSuite_vf_rss.py
@@ -36,8 +36,13 @@ class TestVfRss(TestCase):
self.tester.scapy_foreground()
self.tester.scapy_append('sys.path.append("./")')
self.tester.scapy_append("from sctp import *")
- self.vm_dut_0.send_expect("start", "testpmd>")
- mac = self.vm0_testpmd.get_port_mac(0)
+
+ if self.setup_1pf_1vf_1vm_env_flag == 1:
+ self.vm_dut_0.send_expect("start", "testpmd>")
+ mac = self.vm0_testpmd.get_port_mac(0)
+ else:
+ mac = self.pmd_out.get_port_mac(0)
+
# send packet with different source and dest ip
if tran_type == "ipv4-other":
for i in range(packet_count):
@@ -152,8 +157,11 @@ class TestVfRss(TestCase):
else:
print("\ntran_type error!\n")
-
- out = self.vm_dut_0.get_session_output()
+ if self.setup_1pf_1vf_1vm_env_flag == 1:
+ out = self.vm_dut_0.get_session_output()
+ else:
+ out = self.dut.get_session_output()
+ self.dut.send_expect("show fwd stats all", "testpmd>")
print("*******************************************")
print(out)
if not reta_entries:
@@ -195,7 +203,8 @@ class TestVfRss(TestCase):
break
else:
pass
- self.verifyResult()
+ if "pmdrss" in self.running_case:
+ self.verifyResult()
def verifyResult(self):
"""
@@ -265,6 +274,7 @@ class TestVfRss(TestCase):
"I40E_25G-25G_SFP28",
"IXGBE_10G-X550T",
"IXGBE_10G-X550EM_X_10G_T",
+ "IXGBE_10G-82599_SFP",
"I40E_10G-SFP_X722",
"I40E_10G-10G_BASE_T_X722",
"I40E_10G-10G_BASE_T_BC",
@@ -292,13 +302,15 @@ class TestVfRss(TestCase):
self.host_testpmd = None
self.setup_1pf_1vf_1vm_env_flag = 0
self.dcf_mode = load_global_setting(DPDK_DCFMODE_SETTING)
- self.setup_1pf_1vf_1vm_env(driver="")
def set_up(self):
"""
Run before each test case.
"""
- pass
+ if "rxq_txq_inconsistent" in self.running_case:
+ self.destroy_1pf_1vf_1vm_env()
+ elif self.setup_1pf_1vf_1vm_env_flag == 0:
+ self.setup_1pf_1vf_1vm_env(driver="")
def setup_1pf_1vf_1vm_env(self, driver="default"):
@@ -362,7 +374,7 @@ class TestVfRss(TestCase):
port = self.dut.ports_info[port_id]["port"]
port.bind_driver()
- self.setup_1pf_2vf_1vm_env_flag = 0
+ self.setup_1pf_1vf_1vm_env_flag = 0
def launch_testpmd(self, **kwargs):
dcf_flag = kwargs.get("dcf_flag")
@@ -375,6 +387,12 @@ class TestVfRss(TestCase):
port_options={self.vf0_guest_pci: "cap=dcf"},
socket=self.vm0_ports_socket,
)
+ elif self.setup_1pf_1vf_1vm_env_flag == 0:
+ self.pmd_out.start_testpmd(
+ cores="1S/9C/1T",
+ param=param,
+ eal_param="-a %s --file-prefix=vf" % self.vf_port_pci,
+ )
else:
self.vm0_testpmd.start_testpmd(
"all",
@@ -503,6 +521,69 @@ class TestVfRss(TestCase):
self.send_packet(itf, iptype, queue, 128)
self.vm_dut_0.send_expect("quit", "# ", 30)
+ def test_vf_rss_rxq_txq_inconsistent(self):
+
+ self.pmd_out = PmdOutput(self.dut)
+ self.dut.generate_sriov_vfs_by_port(self.dut_ports[0], 1)
+ self.vf_port = self.dut.ports_info[self.dut_ports[0]]["vfs_port"][0]
+ iptypes = {
+ "ipv4-other": "ip",
+ "ipv4-udp": "udp",
+ "ipv4-tcp": "tcp",
+ "ipv4-sctp": "sctp",
+ }
+ if self.kdriver == "ixgbe":
+ testRxqTxq = [
+ {
+ "rxq": 2,
+ "txq": 4,
+ },
+ {
+ "rxq": 1,
+ "txq": 2,
+ },
+ ]
+ else:
+ testRxqTxq = [
+ {
+ "rxq": 4,
+ "txq": 8,
+ },
+ {
+ "rxq": 6,
+ "txq": 8,
+ },
+ {
+ "rxq": 3,
+ "txq": 9,
+ },
+ {
+ "rxq": 4,
+ "txq": 16,
+ },
+ ]
+ self.vf_port.bind_driver(driver="vfio-pci")
+ self.vf_port_pci = self.dut.ports_info[self.dut_ports[0]]["sriov_vfs_pci"][0]
+ localPort = self.tester.get_local_port(self.dut_ports[0])
+ itf = self.tester.get_interface(localPort)
+ eal_param = "--nb-core=8"
+ # test with different rss queues
+ for i in testRxqTxq:
+ self.launch_testpmd(
+ param="--rxq=%s --txq=%s %s"
+ % (str(i["rxq"]), str(i["txq"]), eal_param),
+ )
+ self.dut.send_expect("set fwd rxonly", "testpmd>")
+ self.dut.send_expect("set verbose 1", "testpmd>")
+ self.dut.send_expect("start", "testpmd>")
+ self.pmd_out.wait_link_status_up("all")
+ queue = i["rxq"]
+ for iptype, rsstype in list(iptypes.items()):
+ self.send_packet(itf, iptype, queue, 64)
+
+ self.dut.send_expect("stop", "testpmd>")
+ self.dut.send_expect("quit", "# ", 30)
+
def tear_down(self):
"""
Run after each test case.
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [dts][PATCH V2 2/2] tests/vf_rss: add case test_vf_rss_rxq_txq_inconsistent
2023-01-12 4:36 ` [dts][PATCH V2 2/2] tests/vf_rss: add case test_vf_rss_rxq_txq_inconsistent Lingli Chen
@ 2023-01-12 9:05 ` Peng, Yuan
2023-01-13 2:46 ` lijuan.tu
1 sibling, 0 replies; 4+ messages in thread
From: Peng, Yuan @ 2023-01-12 9:05 UTC (permalink / raw)
To: Chen, LingliX, dts
> -----Original Message-----
> From: Chen, LingliX <linglix.chen@intel.com>
> Sent: Thursday, January 12, 2023 12:37 PM
> To: dts@dpdk.org
> Cc: Peng, Yuan <yuan.peng@intel.com>; Chen, LingliX
> <linglix.chen@intel.com>
> Subject: [dts][PATCH V2 2/2] tests/vf_rss: add case
> test_vf_rss_rxq_txq_inconsistent
>
> add new case to cover Tx queue number is more than Rx queue number
>
> Signed-off-by: Lingli Chen <linglix.chen@intel.com>
> ---
Acked-by: Yuan Peng <yuan.peng@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dts][PATCH V2 2/2] tests/vf_rss: add case test_vf_rss_rxq_txq_inconsistent
2023-01-12 4:36 ` [dts][PATCH V2 2/2] tests/vf_rss: add case test_vf_rss_rxq_txq_inconsistent Lingli Chen
2023-01-12 9:05 ` Peng, Yuan
@ 2023-01-13 2:46 ` lijuan.tu
1 sibling, 0 replies; 4+ messages in thread
From: lijuan.tu @ 2023-01-13 2:46 UTC (permalink / raw)
To: dts, Lingli Chen; +Cc: yuan.peng, Lingli Chen
On Wed, 11 Jan 2023 23:36:54 -0500, Lingli Chen <linglix.chen@intel.com> wrote:
> add new case to cover Tx queue number is more than Rx queue number
>
> Signed-off-by: Lingli Chen <linglix.chen@intel.com>
Acked-by: Lijuan Tu <lijuan.tu@intel.com>
Series applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-13 2:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-12 4:36 [dts][PATCH V2 1/2] test_plans/vf_rss: add new case to test Tx queue number is more than Rx queue number Lingli Chen
2023-01-12 4:36 ` [dts][PATCH V2 2/2] tests/vf_rss: add case test_vf_rss_rxq_txq_inconsistent Lingli Chen
2023-01-12 9:05 ` Peng, Yuan
2023-01-13 2:46 ` 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).