test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V1 0/1] l3fwd: support python3
@ 2020-01-17  8:18 yufengmx
  2020-01-17  8:18 ` [dts] [PATCH V1 1/1] tests/l3fwd: " yufengmx
  0 siblings, 1 reply; 2+ messages in thread
From: yufengmx @ 2020-01-17  8:18 UTC (permalink / raw)
  To: dts, lijuan.tu; +Cc: yufengmx

support python3 

yufengmx (1):
  tests/l3fwd: support python3

 tests/l3fwd_base.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
2.21.0


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

* [dts] [PATCH V1 1/1] tests/l3fwd: support python3
  2020-01-17  8:18 [dts] [PATCH V1 0/1] l3fwd: support python3 yufengmx
@ 2020-01-17  8:18 ` " yufengmx
  0 siblings, 0 replies; 2+ messages in thread
From: yufengmx @ 2020-01-17  8:18 UTC (permalink / raw)
  To: dts, lijuan.tu; +Cc: yufengmx


support python3.

Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
 tests/l3fwd_base.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/l3fwd_base.py b/tests/l3fwd_base.py
index 2a91cf8..fafab0c 100644
--- a/tests/l3fwd_base.py
+++ b/tests/l3fwd_base.py
@@ -192,7 +192,7 @@ class L3fwdBase(object):
                         if index >= 2 * len(self.__valports):
                             break
                         port_id = \
-                            self.__valports[(index / 2) % len(self.__valports)]
+                            self.__valports[int(index / 2) % len(self.__valports)]
                         dmac = self.dut.get_mac_address(port_id)
                         _layer = {'ether': {'dst': dmac, }, }
                         _layer.update(config)
@@ -230,7 +230,7 @@ class L3fwdBase(object):
                  for index, _ in enumerate(self.__valports)] \
                  if len(self.__valports) > 1 else [[port(0), port(0)]]
         stream_ids = []
-        step = len(streams) / len(self.__valports)
+        step = int(len(streams) / len(self.__valports))
         for cnt, stream in enumerate(streams):
             pkt, field_config = stream
             index = cnt // step
@@ -476,7 +476,7 @@ class L3fwdBase(object):
         with open(_js_file, 'w') as fp:
             json.dump(self.__json_results, fp, indent=4,
                       separators=(',', ': '),
-                      encoding="utf-8", sort_keys=True)
+                      sort_keys=True)
 
     def __display_suite_result(self, data, mode):
         values = data.get('values')
@@ -651,7 +651,7 @@ class L3fwdBase(object):
 
     def __parse_port_config(self, config):
         cores, total_threads, queue = config.split('/')
-        _thread = str(int(total_threads[:-1]) / int(cores[:-1])) + 'T'
+        _thread = str(int(int(total_threads[:-1]) / int(cores[:-1]))) + 'T'
         _cores = str(int(cores[:-1]) * len(self.__valports)) + 'C'
         # only use one socket
         cores_config = '/'.join(['1S', _cores, _thread])
-- 
2.21.0


^ 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-17  8:18 [dts] [PATCH V1 0/1] l3fwd: support python3 yufengmx
2020-01-17  8:18 ` [dts] [PATCH V1 1/1] tests/l3fwd: " yufengmx

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