From: "Liu, Yong" <yong.liu@intel.com>
To: "Lu, PeipeiX" <peipeix.lu@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Lu, PeipeiX" <peipeix.lu@intel.com>
Subject: Re: [dts] [PATCH V1] fix the ports and core from different socket
Date: Tue, 12 Jun 2018 01:43:09 +0000 [thread overview]
Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E630C2016@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1527759995-33457-1-git-send-email-peipeix.lu@intel.com>
Peipei,
Some comments below.
Thanks,
Marvin
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lu,peipei
> Sent: Thursday, May 31, 2018 5:47 PM
> To: dts@dpdk.org
> Cc: Lu, PeipeiX <peipeix.lu@intel.com>
> Subject: [dts] [PATCH V1] fix the ports and core from different socket
>
> the cases need ports and cores from the same socket.
> ---
> tests/TestSuite_unit_tests_pmd_perf.py | 24 ++++++++++++++++++++----
> 1 file changed, 20 insertions(+), 4 deletions(-)
>
> diff --git a/tests/TestSuite_unit_tests_pmd_perf.py
> b/tests/TestSuite_unit_tests_pmd_perf.py
> index 7fc200e..a72d470 100644
> --- a/tests/TestSuite_unit_tests_pmd_perf.py
> +++ b/tests/TestSuite_unit_tests_pmd_perf.py
> @@ -85,12 +85,28 @@ class TestUnitTestsPmdPerf(TestCase):
> """
> pass
>
> + def get_core_from_socket(self):
> + """
> + select the port and lcores from same socket.
> + """
> + out = self.dut.send_expect("./usertools/cpu_layout.py","#", 10)
> + k = re.search("Core 0 (.*)", out)
> + result = re.findall("(\d+),", k.group())
> + port = self.dut.ports_info[0]['pci']
> + m = re.findall(":(\d+):", port)
> + if int(m[0]) < 10:
> + return int(result[0])
> + else:
> + return int(result[1])
> +
Can't assume socket ID just from bus ID. There's one way to get this information, by "ports_info[0]['port'].socket".
Please take care that socket value maybe -1.
> def test_pmd_burst(self):
> """
> Run pmd stream control mode burst test case.
> """
> + self.core = self.get_core_from_socket()
> +
Code is not aligned here, please check indent.
> + self.dut.send_expect("./test/test/test -n 1 --lcores='%d-
> %d'" %(self.core, self.core + 6), "R.*T.*E.*>.*>", 60)
>
> - self.dut.send_expect("./test/test/test -n 1 -c f",
> "R.*T.*E.*>.*>", 60)
> for mode in self.burst_ctlmodes:
> self.dut.send_expect("set_rxtx_sc %s" % mode, "RTE>>", 10)
> out = self.dut.send_expect("pmd_perf_autotest", "RTE>>", 120)
> @@ -105,7 +121,7 @@ class TestUnitTestsPmdPerf(TestCase):
> """
> Run pmd stream control mode continues test case.
> """
> -
> + self.core = self.get_core_from_socket()
Code is not aligned here, please check indent.
> self.table_header = ['Mode']
> self.table_header += self.anchors
> self.result_table_create(self.table_header)
> @@ -113,9 +129,9 @@ class TestUnitTestsPmdPerf(TestCase):
>
> for mode in self.rxtx_modes:
> if mode is "scalar":
> - self.dut.send_expect("./test/test/test_scalar -n 1 -c f",
> "R.*T.*E.*>.*>", 60)
> + self.dut.send_expect("./test/test/test_scalar -n 1 --
> lcores='%d-%d'" %(self.core, self.core + 6), "R.*T.*E.*>.*>", 60)
> else:
> - self.dut.send_expect("./test/test/test -n 1 -c f",
> "R.*T.*E.*>.*>", 60)
> + self.dut.send_expect("./test/test/test -n 1 --lcores='%d-
> %d'" %(self.core, self.core + 6), "R.*T.*E.*>.*>", 60)
>
> table_row = [mode]
> self.dut.send_expect("set_rxtx_sc continuous", "RTE>>", 10)
> --
> 1.9.3
prev parent reply other threads:[~2018-06-12 1:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-31 9:46 lu,peipei
2018-06-12 1:43 ` Liu, Yong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86228AFD5BCD8E4EBFD2B90117B5E81E630C2016@SHSMSX103.ccr.corp.intel.com \
--to=yong.liu@intel.com \
--cc=dts@dpdk.org \
--cc=peipeix.lu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).