* Re: [dts] [PATCH V2 3/4] tests/kernelpf_iavf:add new case
2021-09-07 19:37 ` [dts] [PATCH V2 3/4] tests/kernelpf_iavf:add new case Zhimin Huang
@ 2021-09-07 11:16 ` Huang, ZhiminX
0 siblings, 0 replies; 8+ messages in thread
From: Huang, ZhiminX @ 2021-09-07 11:16 UTC (permalink / raw)
To: dts
[-- Attachment #1: Type: text/plain, Size: 322 bytes --]
> -----Original Message-----
> From: Huang, ZhiminX <zhiminx.huang@intel.com>
> Sent: Wednesday, September 8, 2021 3:37 AM
> To: dts@dpdk.org
> Cc: Huang, ZhiminX <zhiminx.huang@intel.com>
> Subject: [dts] [PATCH V2 3/4] tests/kernelpf_iavf:add new case
>
Tested-by: Zhimin Huang <zhiminx.huang@intel.com >
[-- Attachment #2: TestKernelpfIavf.log --]
[-- Type: application/octet-stream, Size: 298434 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dts] [PATCH V2 4/4] tests/stats_checks:add new test case
2021-09-07 19:37 ` [dts] [PATCH V2 4/4] tests/stats_checks:add new test case Zhimin Huang
@ 2021-09-07 11:17 ` Huang, ZhiminX
2021-09-14 8:40 ` Tu, Lijuan
0 siblings, 1 reply; 8+ messages in thread
From: Huang, ZhiminX @ 2021-09-07 11:17 UTC (permalink / raw)
To: dts
[-- Attachment #1: Type: text/plain, Size: 324 bytes --]
> -----Original Message-----
> From: Huang, ZhiminX <zhiminx.huang@intel.com>
> Sent: Wednesday, September 8, 2021 3:37 AM
> To: dts@dpdk.org
> Cc: Huang, ZhiminX <zhiminx.huang@intel.com>
> Subject: [dts] [PATCH V2 4/4] tests/stats_checks:add new test case
>
Tested-by: Zhimin Huang <zhiminx.huang@intel.com >
[-- Attachment #2: TestStatsChecks.log --]
[-- Type: application/octet-stream, Size: 112651 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dts] [PATCH V2 0/4] add plan and case
@ 2021-09-07 19:37 Zhimin Huang
2021-09-07 19:37 ` [dts] [PATCH V2 1/4] test_plans/kernelpf_iavf_test_plan:add case in plan Zhimin Huang
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Zhimin Huang @ 2021-09-07 19:37 UTC (permalink / raw)
To: dts; +Cc: Zhimin Huang
add some new test points:
kernelpf_iavf:
add remove mac test.
add check rss reta changed.
add rss hash key test.
stats_checks:
add clear stats test.
v2:
- fix typo issue.
Zhimin Huang (4):
test_plans/kernelpf_iavf_test_plan:add case in plan
test_plans/stats_checks_test_plan:add case in plan
tests/kernelpf_iavf:add new case
tests/stats_checks:add new test case
test_plans/kernelpf_iavf_test_plan.rst | 94 +++++++++++++++++++++++---
test_plans/stats_checks_test_plan.rst | 15 ++++
tests/TestSuite_kernelpf_iavf.py | 42 +++++++++++-
tests/TestSuite_stats_checks.py | 19 ++++--
4 files changed, 156 insertions(+), 14 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dts] [PATCH V2 1/4] test_plans/kernelpf_iavf_test_plan:add case in plan
2021-09-07 19:37 [dts] [PATCH V2 0/4] add plan and case Zhimin Huang
@ 2021-09-07 19:37 ` Zhimin Huang
2021-09-07 19:37 ` [dts] [PATCH V2 2/4] test_plans/stats_checks_test_plan:add " Zhimin Huang
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Zhimin Huang @ 2021-09-07 19:37 UTC (permalink / raw)
To: dts; +Cc: Zhimin Huang
add some new test point in plan:
kernelpf_iavf:
add remove mac test.
add check rss reta changed.
add rss hash key test.
Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
test_plans/kernelpf_iavf_test_plan.rst | 94 +++++++++++++++++++++++---
1 file changed, 85 insertions(+), 9 deletions(-)
diff --git a/test_plans/kernelpf_iavf_test_plan.rst b/test_plans/kernelpf_iavf_test_plan.rst
index 31ba975..2b5a785 100644
--- a/test_plans/kernelpf_iavf_test_plan.rst
+++ b/test_plans/kernelpf_iavf_test_plan.rst
@@ -105,6 +105,27 @@ packets can be received and forwarded by the VF::
Use scapy to send 100 random packets with a wrong MAC to VF0, verify the
packets can't be received by the VF.
+Remove the MAC 00:11:22:33:44:55::
+
+ testpmd> mac_addr remove 0 00:11:22:33:44:55
+
+Use scapy to send 100 random packets with removed VF0's MAC, verify the
+packets can't be received and forwarded by the VF::
+
+Set the default mac address to other mac, check the mac address has be changed
+to new set mac::
+
+ testpmd> mac_addr set 0 00:01:23:45:67:11
+ testpmd> show port info 0
+
+Use scapy to send 100 random packets with original VF0's MAC, verify the
+packets can't be received and forwarded by the VF
+
+Use scapy to send 100 random packets with new set VF0's MAC, verify the
+packets can be received and forwarded by the VF
+
+Reset to original mac address
+
Note::
Not set VF MAC from kernel PF for this case, if set, will print
"not permitted error" when add new MAC for VF.
@@ -350,17 +371,35 @@ Start command with multi-queues like below::
./testpmd -c f -n 4 -- -i --txq=4 --rxq=4
+Show RSS RETA configuration::
+
+ testpmd> show port 0 rss reta 64 (0xffffffffffffffff)
+
+ RSS RETA configuration: hash index=0, queue=0
+ RSS RETA configuration: hash index=1, queue=1
+ RSS RETA configuration: hash index=2, queue=2
+ RSS RETA configuration: hash index=3, queue=3
+ ...
+ RSS RETA configuration: hash index=60, queue=0
+ RSS RETA configuration: hash index=61, queue=1
+ RSS RETA configuration: hash index=62, queue=2
+ RSS RETA configuration: hash index=63, queue=3
+
Config hash reta table::
- testpmd> port config 0 rss reta (0,0)
- testpmd> port config 0 rss reta (1,1)
- testpmd> port config 0 rss reta (2,2)
- testpmd> port config 0 rss reta (3,3)
- ...
- testpmd> port config 0 rss reta (60,0)
- testpmd> port config 0 rss reta (61,1)
- testpmd> port config 0 rss reta (62,2)
- testpmd> port config 0 rss reta (63,3)
+ testpmd> port config 0 rss reta (0,3)
+ testpmd> port config 0 rss reta (1,2)
+ testpmd> port config 0 rss reta (2,1)
+ testpmd> port config 0 rss reta (3,0)
+
+Check RSS RETA configuration has changed::
+
+ testpmd> show port 0 rss reta 64 (0xffffffffffffffff)
+
+ RSS RETA configuration: hash index=0, queue=3
+ RSS RETA configuration: hash index=1, queue=2
+ RSS RETA configuration: hash index=2, queue=2
+ RSS RETA configuration: hash index=3, queue=1
Enable IP/TCP/UDP RSS::
@@ -369,6 +408,43 @@ Enable IP/TCP/UDP RSS::
Send different flow types' IP/TCP/UDP packets to VF port, check packets are
received by different configured queues.
+Test case: VF RSS hash key
+==========================
+
+Start command with multi-queues like below::
+
+ ./testpmd -c f -n 4 -- -i --txq=4 --rxq=4
+
+Show port rss hash key::
+
+ testpmd> show port 0 rss-hash key
+
+Set rxonly fwd, enable print, start testpmd::
+
+ testpmd> set fwd rxonly
+ testpmd> set verbose 1
+ testpmd> start
+
+Send ipv4 packets, mark the RSS hash value::
+
+ p=Ether(dst="56:0A:EC:50:A4:28")/IP(src="1.2.3.4")/Raw(load='X'*30)
+
+Update ipv4 different hash key::
+
+ testpmd> port config 0 rss-hash-key ipv4 1b9d58a4b961d9cd1c56ad1621c3ad51632c16a5d16c21c3513d132c135d132c13ad1531c23a51d6ac49879c499d798a7d949c8a
+
+Show port rss hash key, check the key is same to configured key::
+
+ testpmd> show port 0 rss-hash key
+ RSS functions:
+ all ipv4 ipv6 ip
+ RSS key:
+ 1B9D58A4B961D9CD1C56AD1621C3AD51632C16A5D16C21C3513D132C135D132C13AD1531C23A51D6AC49879C499D798A7D949C8A
+
+Send ipv4 packets, check RSS hash value is different::
+
+ p=Ether(dst="56:0A:EC:50:A4:28")/IP(src="1.2.3.4")/Raw(load='X'*30)
+
Test case: VF HW checksum offload
=================================
--
2.17.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dts] [PATCH V2 2/4] test_plans/stats_checks_test_plan:add case in plan
2021-09-07 19:37 [dts] [PATCH V2 0/4] add plan and case Zhimin Huang
2021-09-07 19:37 ` [dts] [PATCH V2 1/4] test_plans/kernelpf_iavf_test_plan:add case in plan Zhimin Huang
@ 2021-09-07 19:37 ` Zhimin Huang
2021-09-07 19:37 ` [dts] [PATCH V2 3/4] tests/kernelpf_iavf:add new case Zhimin Huang
2021-09-07 19:37 ` [dts] [PATCH V2 4/4] tests/stats_checks:add new test case Zhimin Huang
3 siblings, 0 replies; 8+ messages in thread
From: Zhimin Huang @ 2021-09-07 19:37 UTC (permalink / raw)
To: dts; +Cc: Zhimin Huang
add some new test points in plan:
stats_checks:
add clear stats test.
Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
test_plans/stats_checks_test_plan.rst | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/test_plans/stats_checks_test_plan.rst b/test_plans/stats_checks_test_plan.rst
index 51ec36d..327aaf2 100644
--- a/test_plans/stats_checks_test_plan.rst
+++ b/test_plans/stats_checks_test_plan.rst
@@ -264,6 +264,21 @@ FVL does not support hardware per queue stats,
so rx_qx_packets and rx_qx_bytes are both 0.
tx_qx_packets and tx_qx_bytes are both 0 too.
+6. Clear stats::
+
+ testpmd> clear port stats all
+
+7. Check stats and xstats, verify rx_good_packets, RX-packets of port 0 and tx_good_packets, TX-packets of port 1 are both 0.
+
+8. Repeat above 4 and 5 steps.
+
+9. Clear xstats::
+
+ testpmd> clear port xstats all
+
+10. Check stats and xstats, verify rx_good_packets, RX-packets of port 0 and tx_good_packets, TX-packets of port 1 are both 0.
+
+
Test Case: VF xstats Checks
============================
1. Create one VF port on a kernel PF, then bind the VF to pmd driver::
--
2.17.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dts] [PATCH V2 3/4] tests/kernelpf_iavf:add new case
2021-09-07 19:37 [dts] [PATCH V2 0/4] add plan and case Zhimin Huang
2021-09-07 19:37 ` [dts] [PATCH V2 1/4] test_plans/kernelpf_iavf_test_plan:add case in plan Zhimin Huang
2021-09-07 19:37 ` [dts] [PATCH V2 2/4] test_plans/stats_checks_test_plan:add " Zhimin Huang
@ 2021-09-07 19:37 ` Zhimin Huang
2021-09-07 11:16 ` Huang, ZhiminX
2021-09-07 19:37 ` [dts] [PATCH V2 4/4] tests/stats_checks:add new test case Zhimin Huang
3 siblings, 1 reply; 8+ messages in thread
From: Zhimin Huang @ 2021-09-07 19:37 UTC (permalink / raw)
To: dts; +Cc: Zhimin Huang
add some new test points in test case:
add remove mac test.
add check rss reta changed.
add rss hash key test.
Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
tests/TestSuite_kernelpf_iavf.py | 42 +++++++++++++++++++++++++++++++-
1 file changed, 41 insertions(+), 1 deletion(-)
diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py
index 5db1ec0..6a858fc 100644
--- a/tests/TestSuite_kernelpf_iavf.py
+++ b/tests/TestSuite_kernelpf_iavf.py
@@ -277,6 +277,17 @@ class TestKernelpfIavf(TestCase):
# send packet with wrong mac
self.send_random_pkt(self.wrong_mac, count=100)
self.verify_packet_count(0)
+ self.vm_testpmd.execute_cmd('clear port stats all')
+ self.vm_testpmd.execute_cmd("mac_addr remove 0 %s" % self.add_addr)
+ self.send_random_pkt(self.add_addr, count=100)
+ self.verify_packet_count(0)
+ self.vm_testpmd.execute_cmd('clear port stats all')
+ self.vm_testpmd.execute_cmd("mac_addr add 0 00:01:23:45:67:11")
+ self.send_random_pkt(self.add_addr, count=100)
+ self.verify_packet_count(0)
+ self.vm_testpmd.execute_cmd('clear port stats all')
+ self.send_random_pkt("00:01:23:45:67:11", count=100)
+ self.verify_packet_count(100)
def get_testpmd_vf_mac(self, out):
result = re.search("([a-f0-9]{2}:){5}[a-f0-9]{2}", out, re.IGNORECASE)
@@ -635,8 +646,11 @@ class TestKernelpfIavf(TestCase):
self.vm_testpmd.start_testpmd("all", "--txq=4 --rxq=4")
self.vm_testpmd.execute_cmd("set fwd mac")
self.vm_testpmd.execute_cmd("set verbose 1")
- for i, j in zip(list(range(64)), [0, 1, 2, 3]*16):
+ default_rss_reta = self.vm_testpmd.execute_cmd("show port 0 rss reta 64 (0xffffffffffffffff)")
+ for i, j in zip(list(range(64)), [3, 2, 1, 0]*16):
self.vm_testpmd.execute_cmd("port config 0 rss reta (%d,%d)" % (i, j))
+ change_rss_reta = self.vm_testpmd.execute_cmd("show port 0 rss reta 64 (0xffffffffffffffff)")
+ self.verify(default_rss_reta != change_rss_reta, "port config rss reta failed")
for type in rss_type:
self.vm_testpmd.execute_cmd("port config all rss %s" % type)
self.vm_testpmd.execute_cmd("start")
@@ -646,6 +660,32 @@ class TestKernelpfIavf(TestCase):
self.verify_packet_number(out)
self.vm_testpmd.execute_cmd("clear port stats all")
+ def test_vf_rss_hash_key(self):
+ update_hash_key = '1b9d58a4b961d9cd1c56ad1621c3ad51632c16a5d16c21c3513d132c135d132c13ad1531c23a51d6ac49879c499d798a7d949c8a'
+ self.vm_testpmd.start_testpmd("all", "--txq=4 --rxq=4")
+ self.vm_testpmd.execute_cmd("show port 0 rss-hash key")
+ self.vm_testpmd.execute_cmd("set fwd rxonly")
+ self.vm_testpmd.execute_cmd("set verbose 1")
+ self.vm_testpmd.execute_cmd("start")
+ pkt1_info = self.send_pkt_gethash()
+ self.vm_testpmd.execute_cmd("port config 0 rss-hash-key ipv4 {}".format(update_hash_key))
+ out = self.vm_testpmd.execute_cmd("show port 0 rss-hash key")
+ self.verify(update_hash_key in out.lower(), "rss hash key update failed")
+ pkt2_info = self.send_pkt_gethash()
+ self.verify(pkt1_info[0][0] != pkt2_info[0][0], "hash value should be different")
+
+ def send_pkt_gethash(self, pkt=''):
+ if pkt == '':
+ pkt = "sendp([Ether(dst='%s')/IP(src='1.2.3.4')/Raw(load='X'*30)], iface='%s')" % (self.vf_mac, self.tester_intf)
+ self.tester.scapy_append(pkt)
+ self.tester.scapy_execute()
+ out = self.vm_dut.get_session_output()
+ p = re.compile("RSS hash=(0x\w+) - RSS queue=(0x\w+)")
+ pkt_info = p.findall(out)
+ self.verify(pkt_info, "received pkt have no hash")
+ self.logger.info("hash values:{}".format(pkt_info))
+ return pkt_info
+
def verify_packet_number(self, out):
queue0_number = len(re.findall('port 0/queue 0', out))
queue1_number = len(re.findall('port 0/queue 1', out))
--
2.17.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dts] [PATCH V2 4/4] tests/stats_checks:add new test case
2021-09-07 19:37 [dts] [PATCH V2 0/4] add plan and case Zhimin Huang
` (2 preceding siblings ...)
2021-09-07 19:37 ` [dts] [PATCH V2 3/4] tests/kernelpf_iavf:add new case Zhimin Huang
@ 2021-09-07 19:37 ` Zhimin Huang
2021-09-07 11:17 ` Huang, ZhiminX
3 siblings, 1 reply; 8+ messages in thread
From: Zhimin Huang @ 2021-09-07 19:37 UTC (permalink / raw)
To: dts; +Cc: Zhimin Huang
add some new test points in test case:
add clear stats test.
Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
tests/TestSuite_stats_checks.py | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/tests/TestSuite_stats_checks.py b/tests/TestSuite_stats_checks.py
index 5dc21b6..58c5236 100644
--- a/tests/TestSuite_stats_checks.py
+++ b/tests/TestSuite_stats_checks.py
@@ -208,10 +208,22 @@ class TestStatsChecks(TestCase):
self.exec("clear port xstats all")
org_xstats = self.get_xstats([rx_port, tx_port])
self.verify_results(org_xstats, rx_port, tx_port, if_zero=True)
- self.exec("start")
+ final_xstats, stats_data = self.sendpkt_get_xstats(rx_port, tx_port, if_vf)
+ self.verify_results(final_xstats, rx_port, tx_port, stats_data=stats_data)
+ self.exec("clear port stats all")
+ clear_stats = self.get_xstats([rx_port, tx_port])
+ self.verify_results(clear_stats, rx_port, tx_port, if_zero=True)
- self.send_pkt_with_random_ip(tx_port, count=100, if_vf=if_vf)
+ final_xstats, stats_data = self.sendpkt_get_xstats(rx_port, tx_port, if_vf)
+ self.verify_results(final_xstats, rx_port, tx_port, stats_data=stats_data)
+ self.exec("clear port xstats all")
+ clear_xstats = self.get_xstats([rx_port, tx_port])
+ self.verify_results(clear_xstats, rx_port, tx_port, if_zero=True)
+ self.pmdout.quit()
+ def sendpkt_get_xstats(self, rx_port, tx_port, if_vf):
+ self.exec("start")
+ self.send_pkt_with_random_ip(tx_port, count=100, if_vf=if_vf)
self.exec("stop")
if rx_port == tx_port:
final_xstats = self.get_xstats([rx_port])
@@ -226,8 +238,7 @@ class TestStatsChecks(TestCase):
rx_port: rx_stats_info,
tx_port: tx_stats_info
}
- self.verify_results(final_xstats, rx_port, tx_port, stats_data=stats_data)
- self.pmdout.quit()
+ return final_xstats, stats_data
def set_up_all(self):
"""
--
2.17.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dts] [PATCH V2 4/4] tests/stats_checks:add new test case
2021-09-07 11:17 ` Huang, ZhiminX
@ 2021-09-14 8:40 ` Tu, Lijuan
0 siblings, 0 replies; 8+ messages in thread
From: Tu, Lijuan @ 2021-09-14 8:40 UTC (permalink / raw)
To: Huang, ZhiminX, dts
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Huang, ZhiminX
> Sent: 2021年9月7日 19:17
> To: dts@dpdk.org
> Subject: Re: [dts] [PATCH V2 4/4] tests/stats_checks:add new test case
>
> > -----Original Message-----
> > From: Huang, ZhiminX <zhiminx.huang@intel.com>
> > Sent: Wednesday, September 8, 2021 3:37 AM
> > To: dts@dpdk.org
> > Cc: Huang, ZhiminX <zhiminx.huang@intel.com>
> > Subject: [dts] [PATCH V2 4/4] tests/stats_checks:add new test case
> >
> Tested-by: Zhimin Huang <zhiminx.huang@intel.com >
Applied, thanks
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-09-14 8:40 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 19:37 [dts] [PATCH V2 0/4] add plan and case Zhimin Huang
2021-09-07 19:37 ` [dts] [PATCH V2 1/4] test_plans/kernelpf_iavf_test_plan:add case in plan Zhimin Huang
2021-09-07 19:37 ` [dts] [PATCH V2 2/4] test_plans/stats_checks_test_plan:add " Zhimin Huang
2021-09-07 19:37 ` [dts] [PATCH V2 3/4] tests/kernelpf_iavf:add new case Zhimin Huang
2021-09-07 11:16 ` Huang, ZhiminX
2021-09-07 19:37 ` [dts] [PATCH V2 4/4] tests/stats_checks:add new test case Zhimin Huang
2021-09-07 11:17 ` Huang, ZhiminX
2021-09-14 8:40 ` Tu, Lijuan
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).