* [dts] [PATCH V1] tests/pmdrss_hash:change hard code
@ 2019-03-12 5:10 yaobing
2019-03-12 9:05 ` Zhu, WenhuiX
2019-03-15 6:13 ` Tu, Lijuan
0 siblings, 2 replies; 5+ messages in thread
From: yaobing @ 2019-03-12 5:10 UTC (permalink / raw)
To: dts; +Cc: yaobing
change the corelist adapted to the actual cores instead of hard code
Signed-off-by: yaobing <bingx.y.yao@intel.com>
---
| 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
--git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash.py
index 60c9819..fc98922 100644
--- a/tests/TestSuite_pmdrss_hash.py
+++ b/tests/TestSuite_pmdrss_hash.py
@@ -464,8 +464,9 @@ class TestPmdrssHash(TestCase):
"""
Run before each test case.
"""
- pass
-
+ cores = self.dut.get_core_list("all")
+ self.coremask = utils.create_mask(cores)
+
def test_toeplitz(self):
dutPorts = self.dut.get_ports(self.nic)
localPort = self.tester.get_local_port(dutPorts[0])
@@ -477,8 +478,8 @@ class TestPmdrssHash(TestCase):
# test with different rss queues
self.dut.send_expect(
- "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=%d --txq=%d" %
- (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
+ "./%s/app/testpmd -c %s -n %d -- -i --rxq=%d --txq=%d" %
+ (self.target, self.coremask, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
for iptype, rsstype in iptypes.items():
self.dut.send_expect("set verbose 8", "testpmd> ")
@@ -514,8 +515,8 @@ class TestPmdrssHash(TestCase):
# test with different rss queues
self.dut.send_expect(
- "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=%d --txq=%d" %
- (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
+ "./%s/app/testpmd -c %s -n %d -- -i --rxq=%d --txq=%d" %
+ (self.target, self.coremask, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
for iptype, rsstype in iptypes.items():
self.dut.send_expect("set verbose 8", "testpmd> ")
@@ -558,8 +559,8 @@ class TestPmdrssHash(TestCase):
# test with different rss queues
self.dut.send_expect(
- "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=%d --txq=%d" %
- (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
+ "./%s/app/testpmd -c %s -n %d -- -i --rxq=%d --txq=%d" %
+ (self.target, self.coremask, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
for iptype, rsstype in iptypes.items():
self.logger.info("***********************%s rss test********************************" % iptype)
@@ -597,8 +598,8 @@ class TestPmdrssHash(TestCase):
# test with different rss queues
self.dut.send_expect(
- "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=%d --txq=%d" %
- (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
+ "./%s/app/testpmd -c %s -n %d -- -i --rxq=%d --txq=%d" %
+ (self.target, self.coremask, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
for iptype, rsstype in iptypes.items():
self.dut.send_expect("set verbose 8", "testpmd> ")
@@ -632,7 +633,7 @@ class TestPmdrssHash(TestCase):
"fortpark_TLV", "fortville_25g"],
"NIC Unsupported: " + str(self.nic))
- self.dut.send_expect("./%s/app/testpmd -c f -n 4 -- -i" % self.target, "testpmd> ", 120)
+ self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i" % (self.target, self.coremask), "testpmd> ", 120)
out = self.dut.send_expect("create bonded device 3 0", "testpmd> ", 30)
bond_device_id = int(re.search("port \d+", out).group().split(" ")[-1].strip())
--
2.17.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH V1] tests/pmdrss_hash:change hard code
2019-03-12 5:10 [dts] [PATCH V1] tests/pmdrss_hash:change hard code yaobing
@ 2019-03-12 9:05 ` Zhu, WenhuiX
2019-03-14 5:34 ` Rami Rosen
2019-03-15 6:13 ` Tu, Lijuan
1 sibling, 1 reply; 5+ messages in thread
From: Zhu, WenhuiX @ 2019-03-12 9:05 UTC (permalink / raw)
To: Yao, BingX Y, dts; +Cc: Yao, BingX Y
Tested-by: Zhu, WenhuiX <wenhuix.zhu@intel.com>
-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of yaobing
Sent: Tuesday, March 12, 2019 1:10 PM
To: dts@dpdk.org
Cc: Yao, BingX Y <bingx.y.yao@intel.com>
Subject: [dts] [PATCH V1] tests/pmdrss_hash:change hard code
change the corelist adapted to the actual cores instead of hard code
Signed-off-by: yaobing <bingx.y.yao@intel.com>
---
| 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash.py index 60c9819..fc98922 100644
--- a/tests/TestSuite_pmdrss_hash.py
+++ b/tests/TestSuite_pmdrss_hash.py
@@ -464,8 +464,9 @@ class TestPmdrssHash(TestCase):
"""
Run before each test case.
"""
- pass
-
+ cores = self.dut.get_core_list("all")
+ self.coremask = utils.create_mask(cores)
+
def test_toeplitz(self):
dutPorts = self.dut.get_ports(self.nic)
localPort = self.tester.get_local_port(dutPorts[0])
@@ -477,8 +478,8 @@ class TestPmdrssHash(TestCase):
# test with different rss queues
self.dut.send_expect(
- "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=%d --txq=%d" %
- (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
+ "./%s/app/testpmd -c %s -n %d -- -i --rxq=%d --txq=%d" %
+ (self.target, self.coremask,
+ self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
for iptype, rsstype in iptypes.items():
self.dut.send_expect("set verbose 8", "testpmd> ") @@ -514,8 +515,8 @@ class TestPmdrssHash(TestCase):
# test with different rss queues
self.dut.send_expect(
- "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=%d --txq=%d" %
- (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
+ "./%s/app/testpmd -c %s -n %d -- -i --rxq=%d --txq=%d" %
+ (self.target, self.coremask,
+ self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
for iptype, rsstype in iptypes.items():
self.dut.send_expect("set verbose 8", "testpmd> ") @@ -558,8 +559,8 @@ class TestPmdrssHash(TestCase):
# test with different rss queues
self.dut.send_expect(
- "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=%d --txq=%d" %
- (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
+ "./%s/app/testpmd -c %s -n %d -- -i --rxq=%d --txq=%d" %
+ (self.target, self.coremask,
+ self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
for iptype, rsstype in iptypes.items():
self.logger.info("***********************%s rss test********************************" % iptype) @@ -597,8 +598,8 @@ class TestPmdrssHash(TestCase):
# test with different rss queues
self.dut.send_expect(
- "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=%d --txq=%d" %
- (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
+ "./%s/app/testpmd -c %s -n %d -- -i --rxq=%d --txq=%d" %
+ (self.target, self.coremask,
+ self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
for iptype, rsstype in iptypes.items():
self.dut.send_expect("set verbose 8", "testpmd> ") @@ -632,7 +633,7 @@ class TestPmdrssHash(TestCase):
"fortpark_TLV", "fortville_25g"],
"NIC Unsupported: " + str(self.nic))
- self.dut.send_expect("./%s/app/testpmd -c f -n 4 -- -i" % self.target, "testpmd> ", 120)
+ self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i" %
+ (self.target, self.coremask), "testpmd> ", 120)
out = self.dut.send_expect("create bonded device 3 0", "testpmd> ", 30)
bond_device_id = int(re.search("port \d+", out).group().split(" ")[-1].strip())
--
2.17.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH V1] tests/pmdrss_hash:change hard code
2019-03-12 9:05 ` Zhu, WenhuiX
@ 2019-03-14 5:34 ` Rami Rosen
0 siblings, 0 replies; 5+ messages in thread
From: Rami Rosen @ 2019-03-14 5:34 UTC (permalink / raw)
To: Zhu, WenhuiX; +Cc: Yao, BingX Y, dts
[-- Attachment #1: Type: text/plain, Size: 48 bytes --]
+1
Reviewed-by: Rami Rosen <ramirose@gmail.com>
[-- Attachment #2: Type: text/html, Size: 206 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH V1] tests/pmdrss_hash:change hard code
2019-03-12 5:10 [dts] [PATCH V1] tests/pmdrss_hash:change hard code yaobing
2019-03-12 9:05 ` Zhu, WenhuiX
@ 2019-03-15 6:13 ` Tu, Lijuan
2019-03-15 7:30 ` Rami Rosen
1 sibling, 1 reply; 5+ messages in thread
From: Tu, Lijuan @ 2019-03-15 6:13 UTC (permalink / raw)
To: Yao, BingX Y, dts; +Cc: Yao, BingX Y
Do you forget to change hardcode of memory channel?
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of yaobing
> Sent: Tuesday, March 12, 2019 1:10 PM
> To: dts@dpdk.org
> Cc: Yao, BingX Y <bingx.y.yao@intel.com>
> Subject: [dts] [PATCH V1] tests/pmdrss_hash:change hard code
>
> change the corelist adapted to the actual cores instead of hard code
>
> Signed-off-by: yaobing <bingx.y.yao@intel.com>
> ---
> tests/TestSuite_pmdrss_hash.py | 23 ++++++++++++-----------
> 1 file changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash.py
> index 60c9819..fc98922 100644
> --- a/tests/TestSuite_pmdrss_hash.py
> +++ b/tests/TestSuite_pmdrss_hash.py
> @@ -464,8 +464,9 @@ class TestPmdrssHash(TestCase):
> """
> Run before each test case.
> """
> - pass
> -
> + cores = self.dut.get_core_list("all")
> + self.coremask = utils.create_mask(cores)
> +
> def test_toeplitz(self):
> dutPorts = self.dut.get_ports(self.nic)
> localPort = self.tester.get_local_port(dutPorts[0])
> @@ -477,8 +478,8 @@ class TestPmdrssHash(TestCase):
>
> # test with different rss queues
> self.dut.send_expect(
> - "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=%d --
> txq=%d" %
> - (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd>
> ", 120)
> + "./%s/app/testpmd -c %s -n %d -- -i --rxq=%d --txq=%d" %
> + (self.target, self.coremask,
> + self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
>
> for iptype, rsstype in iptypes.items():
> self.dut.send_expect("set verbose 8", "testpmd> ") @@ -514,8 +515,8
> @@ class TestPmdrssHash(TestCase):
>
> # test with different rss queues
> self.dut.send_expect(
> - "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=%d --
> txq=%d" %
> - (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd>
> ", 120)
> + "./%s/app/testpmd -c %s -n %d -- -i --rxq=%d --txq=%d" %
> + (self.target, self.coremask,
> + self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
>
> for iptype, rsstype in iptypes.items():
> self.dut.send_expect("set verbose 8", "testpmd> ") @@ -558,8 +559,8
> @@ class TestPmdrssHash(TestCase):
>
> # test with different rss queues
> self.dut.send_expect(
> - "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=%d --
> txq=%d" %
> - (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd>
> ", 120)
> + "./%s/app/testpmd -c %s -n %d -- -i --rxq=%d --txq=%d" %
> + (self.target, self.coremask,
> + self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
>
> for iptype, rsstype in iptypes.items():
> self.logger.info("***********************%s rss
> test********************************" % iptype) @@ -597,8 +598,8 @@
> class TestPmdrssHash(TestCase):
>
> # test with different rss queues
> self.dut.send_expect(
> - "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=%d --
> txq=%d" %
> - (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd>
> ", 120)
> + "./%s/app/testpmd -c %s -n %d -- -i --rxq=%d --txq=%d" %
> + (self.target, self.coremask,
> + self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
>
> for iptype, rsstype in iptypes.items():
> self.dut.send_expect("set verbose 8", "testpmd> ") @@ -632,7 +633,7
> @@ class TestPmdrssHash(TestCase):
> "fortpark_TLV", "fortville_25g"],
> "NIC Unsupported: " + str(self.nic))
>
> - self.dut.send_expect("./%s/app/testpmd -c f -n 4 -- -i" % self.target,
> "testpmd> ", 120)
> + self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i" %
> + (self.target, self.coremask), "testpmd> ", 120)
[Lijuan] Do you forget to change hardcode of memory channel?
> out = self.dut.send_expect("create bonded device 3 0", "testpmd> ", 30)
> bond_device_id = int(re.search("port \d+", out).group().split(" ")[-1].strip())
>
> --
> 2.17.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH V1] tests/pmdrss_hash:change hard code
2019-03-15 6:13 ` Tu, Lijuan
@ 2019-03-15 7:30 ` Rami Rosen
0 siblings, 0 replies; 5+ messages in thread
From: Rami Rosen @ 2019-03-15 7:30 UTC (permalink / raw)
To: Tu, Lijuan; +Cc: Yao, BingX Y, dts
[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]
> - self.dut.send_expect("./%s/app/testpmd -c f -n 4 -- -i" %
self.target,
> "testpmd> ", 120)
> + self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i" %
> + (self.target, self.coremask), "testpmd> ", 120)
[Lijuan] Do you forget to change hardcode of memory channel?
> out = self.dut.send_expect("create bonded device 3 0", "testpmd>
", 30)
> bond_device_id = int(re.search("port \d+", out).group().split("
")[-1].strip())
Hi all,
Good point.
Actually, the number of channels is a non mandatory EAL parameter, and in
DTS it defaults to 1.
http://git.dpdk.org/tools/dts/tree/framework/dut.py#n565
In this module, the other invocations of testpmd were indeed with
get_memory_channels().
In this occurrence it is hardcoded to 4.
The number of memory channels is merely an optimization, as you can see in
the following thread:
https://dev.dpdk.narkive.com/78gtSXha/dpdk-dev-patch-eal-default-to-one-memory-channel-if-not-specified
According to it,
...
Obtaining the correct value of memory channels, especially from a
running system, can be anything from difficult to plain impossible.
...
Not sure what was the reason for hard coding it to 4 in this test case, but
anyhow on this occasion maybe it is better to replace it with
get_memory_channels() as with the rest of the module, for the sake of
consistency.
Regards,
Rami Rosen
>
>
[-- Attachment #2: Type: text/html, Size: 3898 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-03-15 7:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12 5:10 [dts] [PATCH V1] tests/pmdrss_hash:change hard code yaobing
2019-03-12 9:05 ` Zhu, WenhuiX
2019-03-14 5:34 ` Rami Rosen
2019-03-15 6:13 ` Tu, Lijuan
2019-03-15 7:30 ` Rami Rosen
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).