test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "Mo, YufengX" <yufengx.mo@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH V2 1/1] tests/l3fwd: support python3
Date: Fri, 17 Jan 2020 08:56:07 +0000	[thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBACADC@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20200117084522.59845-2-yufengx.mo@intel.com>

applied

> -----Original Message-----
> From: Mo, YufengX
> Sent: Friday, January 17, 2020 4:45 PM
> To: dts@dpdk.org; Tu, Lijuan <lijuan.tu@intel.com>
> Cc: Mo, YufengX <yufengx.mo@intel.com>
> Subject: [dts][PATCH V2 1/1] tests/l3fwd: support python3
> 
> 
> support python3.
> 
> Signed-off-by: yufengmx <yufengx.mo@intel.com>
> ---
>  tests/l3fwd_base.py | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/l3fwd_base.py b/tests/l3fwd_base.py index
> 2a91cf8..132bff3 100644
> --- a/tests/l3fwd_base.py
> +++ b/tests/l3fwd_base.py
> @@ -87,7 +87,7 @@ class L3fwdBase(object):
>          return output_path
> 
>      def d_con(self, cmd):
> -        _cmd = [cmd, '# ', 10] if isinstance(cmd, (str, unicode)) else cmd
> +        _cmd = [cmd, '# ', 10] if isinstance(cmd, (str)) else cmd
>          return self.dut.send_expect(*_cmd)
> 
>      def __get_ipv4_lpm_vm_config(self, lpm_config):
> @@ -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


      reply	other threads:[~2020-01-17  8:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-17  8:45 [dts] [PATCH V2 0/1] l3fwd: " yufengmx
2020-01-17  8:45 ` [dts] [PATCH V2 1/1] tests/l3fwd: " yufengmx
2020-01-17  8:56   ` Tu, Lijuan [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=8CE3E05A3F976642AAB0F4675D0AD20E0BBACADC@SHSMSX101.ccr.corp.intel.com \
    --to=lijuan.tu@intel.com \
    --cc=dts@dpdk.org \
    --cc=yufengx.mo@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).