* [dts] [PATCH V2 0/2] [PATCH V2] pmdrss_hash: replace legacy filter with rte_flow
@ 2021-11-08 6:00 Yu Jiang
2021-11-08 6:00 ` [dts] [PATCH V2 1/2] test_plans/pmdrss_hash: " Yu Jiang
2021-11-08 6:00 ` [dts] [PATCH V2 2/2] tests/pmdrss_hash: " Yu Jiang
0 siblings, 2 replies; 3+ messages in thread
From: Yu Jiang @ 2021-11-08 6:00 UTC (permalink / raw)
To: yuan.peng, dts; +Cc: Yu Jiang
[PATCH V2] pmdrss_hash: replace legacy filter with rte_flow
Yu Jiang (2):
test_plans/pmdrss_hash: replace legacy filter with rte_flow
tests/pmdrss_hash: replace legacy filter with rte_flow
conf/test_case_checklist.json | 11 +++-
test_plans/pmdrss_hash_test_plan.rst | 46 +++++++++++++--
tests/TestSuite_pmdrss_hash.py | 107 +++++++++++++++++------------------
3 files changed, 103 insertions(+), 61 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dts] [PATCH V2 1/2] test_plans/pmdrss_hash: replace legacy filter with rte_flow
2021-11-08 6:00 [dts] [PATCH V2 0/2] [PATCH V2] pmdrss_hash: replace legacy filter with rte_flow Yu Jiang
@ 2021-11-08 6:00 ` Yu Jiang
2021-11-08 6:00 ` [dts] [PATCH V2 2/2] tests/pmdrss_hash: " Yu Jiang
1 sibling, 0 replies; 3+ messages in thread
From: Yu Jiang @ 2021-11-08 6:00 UTC (permalink / raw)
To: yuan.peng, dts; +Cc: Yu Jiang
According to dpdk commit 81db321da("ethdev: remove legacy HASH filter type support"),
remove legacy hash filter, then use rte_flow api to replace.
Signed-off-by: Yu Jiang <yux.jiang@intel.com>
---
| 46 +++++++++++++++++++++++++++++++-----
1 file changed, 40 insertions(+), 6 deletions(-)
--git a/test_plans/pmdrss_hash_test_plan.rst b/test_plans/pmdrss_hash_test_plan.rst
index c0430a0..48a61e5 100644
--- a/test_plans/pmdrss_hash_test_plan.rst
+++ b/test_plans/pmdrss_hash_test_plan.rst
@@ -95,9 +95,20 @@ Testpmd configuration - 16 RX/TX queues per port
testpmd command: set verbose 8
-#. set hash functions, can choose symmetric or not, choose port and packet type::
-
- testpmd command: set_hash_global_config 0 toeplitz ipv4-other enable
+#. set hash functions, can choose symmetric or not, choose port, rss type and packet type::
+
+ Toeplitz hash function: toeplitz
+ testpmd command:
+ flow create <port_id> ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end func toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv4 / end actions rss types ipv4-other end queues end func toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv4 / end actions rss types ipv4-frag end queues end func toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end func toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end func toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv6 / end actions rss types ipv6-other end queues end func toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end func toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end func toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end func toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv6 / end actions rss types ipv6-frag end queues end func toeplitz queues end / end
#. start packet receive::
@@ -129,8 +140,18 @@ Test Case: test_toeplitz_symmetric
The same with the above steps, pay attention to "set hash function", should use::
- set_hash_global_config 0 toeplitz ipv4-other enable
- set_sym_hash_ena_per_port 0 enable
+ Symmetric Toeplitz hash function: symmetric_toeplitz
+ testpmd command:
+ flow create <port_id> ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end func symmetric_toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv4 / end actions rss types ipv4-other end queues end func symmetric_toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv4 / end actions rss types ipv4-frag end queues end func symmetric_toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end func symmetric_toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end func symmetric_toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv6 / end actions rss types ipv6-other end queues end func symmetric_toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end func symmetric_toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end func symmetric_toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end func symmetric_toeplitz queues end / end
+ flow create <port_id> ingress pattern eth / ipv6 / end actions rss types ipv6-frag end queues end func symmetric_toeplitz queues end / end
And send packets with the same flow in different direction::
@@ -142,7 +163,20 @@ And the hash value and queue should be the same for these two flow .
Test Case: test_simple
=======================
-The same as the above test case "test_toeplitz". Just pay attention to set the hash function to "simple xor"
+The same as the above test case "test_toeplitz". Just pay attention to set the hash function to "simple xor"::
+
+ simple XOR hash function: simple_xor
+ testpmd command:
+ flow create <port_id> ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end func simple_xor queues end / end
+ flow create <port_id> ingress pattern eth / ipv4 / end actions rss types ipv4-other end queues end func simple_xor queues end / end
+ flow create <port_id> ingress pattern eth / ipv4 / end actions rss types ipv4-frag end queues end func simple_xor queues end / end
+ flow create <port_id> ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end func simple_xor queues end / end
+ flow create <port_id> ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end func simple_xor queues end / end
+ flow create <port_id> ingress pattern eth / ipv6 / end actions rss types ipv6-other end queues end func simple_xor queues end / end
+ flow create <port_id> ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end func simple_xor queues end / end
+ flow create <port_id> ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end func simple_xor queues end / end
+ flow create <port_id> ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end func simple_xor queues end / end
+ flow create <port_id> ingress pattern eth / ipv6 / end actions rss types ipv6-frag end queues end func simple_xor queues end / end
Test Case: test_simple_symmetric
=================================
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dts] [PATCH V2 2/2] tests/pmdrss_hash: replace legacy filter with rte_flow
2021-11-08 6:00 [dts] [PATCH V2 0/2] [PATCH V2] pmdrss_hash: replace legacy filter with rte_flow Yu Jiang
2021-11-08 6:00 ` [dts] [PATCH V2 1/2] test_plans/pmdrss_hash: " Yu Jiang
@ 2021-11-08 6:00 ` Yu Jiang
1 sibling, 0 replies; 3+ messages in thread
From: Yu Jiang @ 2021-11-08 6:00 UTC (permalink / raw)
To: yuan.peng, dts; +Cc: Yu Jiang
According to dpdk commit 81db321da("ethdev: remove legacy HASH filter type support"),
remove legacy hash filter, then use rte_flow api to replace.
Signed-off-by: Yu Jiang <yux.jiang@intel.com>
---
conf/test_case_checklist.json | 11 ++++-
| 107 ++++++++++++++++++++---------------------
2 files changed, 63 insertions(+), 55 deletions(-)
diff --git a/conf/test_case_checklist.json b/conf/test_case_checklist.json
index d26244e..e0b68fa 100644
--- a/conf/test_case_checklist.json
+++ b/conf/test_case_checklist.json
@@ -1493,6 +1493,9 @@
"ALL"
],
"NIC": [
+ "columbiaville_25g",
+ "columbiaville_100g",
+ "niantic",
"foxville"
],
"Target": [
@@ -1521,7 +1524,7 @@
"ALL"
],
"NIC": [
- "foxville"
+ "foxville"
],
"Target": [
"ALL"
@@ -1550,6 +1553,9 @@
"ALL"
],
"NIC": [
+ "columbiaville_25g",
+ "columbiaville_100g",
+ "niantic",
"foxville"
],
"Target": [
@@ -1579,6 +1585,9 @@
"ALL"
],
"NIC": [
+ "columbiaville_25g",
+ "columbiaville_100g",
+ "niantic",
"foxville"
],
"Target": [
--git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash.py
index 2ff98cb..b4ee6ef 100644
--- a/tests/TestSuite_pmdrss_hash.py
+++ b/tests/TestSuite_pmdrss_hash.py
@@ -416,28 +416,12 @@ class TestPmdrssHash(TestCase):
Run at the start of each test suite.
"""
- self.verify(self.nic in ["columbiaville_25g", "columbiaville_100g","fortville_eagle", "fortville_spirit",
- "fortville_spirit_single", "fortpark_TLV", "fortpark_BASE-T","fortville_25g", "niantic", "carlsville", "foxville"],
- "NIC Unsupported: " + str(self.nic))
global reta_num
global iptypes
global queue
- if self.nic in ["foxville"]:
- queue = 4
if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortpark_BASE-T","fortville_25g", "carlsville"]:
reta_num = 512
- elif self.nic in ["niantic", "foxville"]:
- reta_num = 128
- iptypes = {'ipv4-other': 'ip',
- 'ipv4-frag': 'ip',
- 'ipv4-udp': 'udp',
- 'ipv4-tcp': 'tcp',
- 'ipv6-other': 'ip',
- 'ipv6-udp': 'udp',
- 'ipv6-tcp': 'tcp',
- 'ipv6-frag': 'ip'
- }
else:
self.verify(False, "NIC Unsupported:%s" % str(self.nic))
ports = self.dut.get_ports(self.nic)
@@ -456,6 +440,7 @@ class TestPmdrssHash(TestCase):
dutPorts = self.dut.get_ports(self.nic)
localPort = self.tester.get_local_port(dutPorts[0])
itf = self.tester.get_interface(localPort)
+ rule_action = 'func toeplitz queues end / end'
global reta_num
global iptypes
@@ -474,8 +459,14 @@ class TestPmdrssHash(TestCase):
"set nbcore %d" % (queue + 1), "testpmd> ")
self.dut.send_expect("port stop all", "testpmd> ")
- self.dut.send_expect(
- "set_hash_global_config 0 toeplitz %s enable" % iptype, "testpmd> ")
+ self.dut.send_expect("flow flush 0", "testpmd> ")
+ rule_cmd = f'flow create 0 ingress pattern eth / ipv4 / end actions rss types {iptype} end queues end {rule_action}'
+ if 'sctp' in iptype or 'udp' in iptype or 'tcp' in iptype:
+ rule_cmd = rule_cmd.replace('/ ipv4 /', f'/ ipv4 / {rsstype} /')
+ if 'ipv6' in iptype:
+ rule_cmd = rule_cmd.replace('ipv4', 'ipv6')
+ outx = self.dut.send_expect(rule_cmd, "testpmd> ")
+ self.verify("created" in outx, "Create flow failed")
self.dut.send_expect("port start all", "testpmd> ")
out = self.dut.send_expect(
"port config all rss %s" % rsstype, "testpmd> ")
@@ -519,7 +510,8 @@ class TestPmdrssHash(TestCase):
rule_cmd = rule_cmd.replace('/ ipv4 /', f'/ ipv4 / {rsstype} /')
if 'ipv6' in iptype:
rule_cmd = rule_cmd.replace('ipv4', 'ipv6')
- self.dut.send_expect(rule_cmd, "testpmd> ")
+ outx = self.dut.send_expect(rule_cmd, "testpmd> ")
+ self.verify("created" in outx, "Create flow failed")
self.dut.send_expect("port start all", "testpmd> ")
out = self.dut.send_expect(
"port config all rss %s" % rsstype, "testpmd> ")
@@ -540,6 +532,7 @@ class TestPmdrssHash(TestCase):
dutPorts = self.dut.get_ports(self.nic)
localPort = self.tester.get_local_port(dutPorts[0])
itf = self.tester.get_interface(localPort)
+ rule_action = 'func simple_xor queues end / end'
global reta_num
global iptypes
@@ -560,8 +553,14 @@ class TestPmdrssHash(TestCase):
self.dut.send_expect("port stop all", "testpmd> ")
# some nic not support change hash algorithm
- self.dut.send_expect(
- "set_hash_global_config 0 simple_xor %s enable" % iptype, "testpmd> ")
+ self.dut.send_expect("flow flush 0", "testpmd> ")
+ rule_cmd = f'flow create 0 ingress pattern eth / ipv4 / end actions rss types {iptype} end queues end {rule_action}'
+ if 'sctp' in iptype or 'udp' in iptype or 'tcp' in iptype:
+ rule_cmd = rule_cmd.replace('/ ipv4 /', f'/ ipv4 / {rsstype} /')
+ if 'ipv6' in iptype:
+ rule_cmd = rule_cmd.replace('ipv4', 'ipv6')
+ outx = self.dut.send_expect(rule_cmd, "testpmd> ")
+ self.verify("created" in outx, "Create flow failed")
self.dut.send_expect("port start all", "testpmd> ")
out = self.dut.send_expect(
"port config all rss %s" % rsstype, "testpmd> ")
@@ -575,48 +574,48 @@ class TestPmdrssHash(TestCase):
self.dut.send_expect("quit", "# ", 30)
- def test_simple_symmetric(self):
+ def test_simple_symmetric(self):
- dutPorts = self.dut.get_ports(self.nic)
- localPort = self.tester.get_local_port(dutPorts[0])
- itf = self.tester.get_interface(localPort)
- global reta_num
- global iptypes
- self.dut.kill_all()
+ dutPorts = self.dut.get_ports(self.nic)
+ localPort = self.tester.get_local_port(dutPorts[0])
+ itf = self.tester.get_interface(localPort)
+ global reta_num
+ global iptypes
+ self.dut.kill_all()
- # test with different rss queues
- self.dut.send_expect(
- "%s %s -- -i --rxq=%d --txq=%d" %
- (self.path, self.eal_para, queue, queue), "testpmd> ", 120)
-
- for iptype, rsstype in list(iptypes.items()):
- self.dut.send_expect("set verbose 8", "testpmd> ")
- self.dut.send_expect("set fwd rxonly", "testpmd> ")
- self.dut.send_expect("set promisc all off", "testpmd> ")
+ # test with different rss queues
self.dut.send_expect(
- "set nbcore %d" % (queue + 1), "testpmd> ")
+ "%s %s -- -i --rxq=%d --txq=%d" %
+ (self.path, self.eal_para, queue, queue), "testpmd> ", 120)
- self.dut.send_expect("port stop all", "testpmd> ")
- self.dut.send_expect(
- "set_hash_global_config 0 simple_xor %s enable" % iptype, "testpmd> ")
- self.dut.send_expect(
- "set_sym_hash_ena_per_port 0 enable", "testpmd> ")
- self.dut.send_expect("port start all", "testpmd> ")
+ for iptype, rsstype in list(iptypes.items()):
+ self.dut.send_expect("set verbose 8", "testpmd> ")
+ self.dut.send_expect("set fwd rxonly", "testpmd> ")
+ self.dut.send_expect("set promisc all off", "testpmd> ")
+ self.dut.send_expect(
+ "set nbcore %d" % (queue + 1), "testpmd> ")
- out = self.dut.send_expect(
- "port config all rss %s" % rsstype, "testpmd> ")
- self.verify("error" not in out, "Configuration of RSS hash failed: Invalid argument")
- # configure the reta with specific mappings.
- for i in range(reta_num):
- reta_entries.insert(i, random.randint(0, queue - 1))
+ self.dut.send_expect("port stop all", "testpmd> ")
self.dut.send_expect(
- "port config 0 rss reta (%d,%d)" % (i, reta_entries[i]), "testpmd> ")
- self.send_packet_symmetric(itf, iptype)
+ "set_hash_global_config 0 simple_xor %s enable" % iptype, "testpmd> ")
+ self.dut.send_expect(
+ "set_sym_hash_ena_per_port 0 enable", "testpmd> ")
+ self.dut.send_expect("port start all", "testpmd> ")
- self.dut.send_expect("quit", "# ", 30)
+ out = self.dut.send_expect(
+ "port config all rss %s" % rsstype, "testpmd> ")
+ self.verify("error" not in out, "Configuration of RSS hash failed: Invalid argument")
+ # configure the reta with specific mappings.
+ for i in range(reta_num):
+ reta_entries.insert(i, random.randint(0, queue - 1))
+ self.dut.send_expect(
+ "port config 0 rss reta (%d,%d)" % (i, reta_entries[i]), "testpmd> ")
+ self.send_packet_symmetric(itf, iptype)
+
+ self.dut.send_expect("quit", "# ", 30)
def test_dynamic_rss_bond_config(self):
-
+
# setup testpmd and finish bond config
self.verify(self.nic in ["columbiaville_25g", "columbiaville_100g","fortville_eagle", "fortville_spirit",
"fortpark_TLV","fortpark_BASE-T", "fortville_25g", "carlsville", "foxville"],
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-08 6:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08 6:00 [dts] [PATCH V2 0/2] [PATCH V2] pmdrss_hash: replace legacy filter with rte_flow Yu Jiang
2021-11-08 6:00 ` [dts] [PATCH V2 1/2] test_plans/pmdrss_hash: " Yu Jiang
2021-11-08 6:00 ` [dts] [PATCH V2 2/2] tests/pmdrss_hash: " Yu Jiang
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).