test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V1]nic_single_core_perf: fixed an error when using 4 ports
@ 2020-01-19  5:57 hanyingya
  2020-01-19  8:34 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: hanyingya @ 2020-01-19  5:57 UTC (permalink / raw)
  To: dts; +Cc: hanyingya

Signed-off-by: hanyingya <yingyax.han@intel.com>
---
 tests/TestSuite_nic_single_core_perf.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_nic_single_core_perf.py b/tests/TestSuite_nic_single_core_perf.py
index 7533b53..5781bc4 100644
--- a/tests/TestSuite_nic_single_core_perf.py
+++ b/tests/TestSuite_nic_single_core_perf.py
@@ -177,8 +177,8 @@ class TestNicSingleCorePerf(TestCase):
             for pcap in pcaps[0]:
                 tgen_input.append((txIntf, rxIntf, pcap))
         else:
-            for rxPort in range(self.nb_ports):
-                if rxPort % self.nb_ports == 0 or self.nb_ports % rxPort == 2:
+            for rxPort in range(port_num):
+                if rxPort % port_num == 0 or rxPort ** 2 == port_num:
                     txIntf = self.tester.get_local_port(self.dut_ports[rxPort + 1])
                     port_id = self.dut_ports[rxPort + 1]
                 else:
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH V1]nic_single_core_perf: fixed an error when using 4 ports
  2020-01-19  5:57 [dts] [PATCH V1]nic_single_core_perf: fixed an error when using 4 ports hanyingya
@ 2020-01-19  8:34 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2020-01-19  8:34 UTC (permalink / raw)
  To: Han, YingyaX, dts; +Cc: Han, YingyaX

applied

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of hanyingya
> Sent: Sunday, January 19, 2020 1:57 PM
> To: dts@dpdk.org
> Cc: Han, YingyaX <yingyax.han@intel.com>
> Subject: [dts] [PATCH V1]nic_single_core_perf: fixed an error when using 4
> ports
> 
> Signed-off-by: hanyingya <yingyax.han@intel.com>
> ---
>  tests/TestSuite_nic_single_core_perf.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/TestSuite_nic_single_core_perf.py
> b/tests/TestSuite_nic_single_core_perf.py
> index 7533b53..5781bc4 100644
> --- a/tests/TestSuite_nic_single_core_perf.py
> +++ b/tests/TestSuite_nic_single_core_perf.py
> @@ -177,8 +177,8 @@ class TestNicSingleCorePerf(TestCase):
>              for pcap in pcaps[0]:
>                  tgen_input.append((txIntf, rxIntf, pcap))
>          else:
> -            for rxPort in range(self.nb_ports):
> -                if rxPort % self.nb_ports == 0 or self.nb_ports % rxPort == 2:
> +            for rxPort in range(port_num):
> +                if rxPort % port_num == 0 or rxPort ** 2 == port_num:
>                      txIntf = self.tester.get_local_port(self.dut_ports[rxPort + 1])
>                      port_id = self.dut_ports[rxPort + 1]
>                  else:
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-19  5:57 [dts] [PATCH V1]nic_single_core_perf: fixed an error when using 4 ports hanyingya
2020-01-19  8:34 ` Tu, Lijuan

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox