test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "Li, WenjieX A" <wenjiex.a.li@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Li, WenjieX A" <wenjiex.a.li@intel.com>
Subject: Re: [dts] [PATCH V1] fix crc strip only supports 2 ports env issue
Date: Tue, 15 Jan 2019 05:58:54 +0000	[thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA0299F@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1547192756-26241-1-git-send-email-wenjiex.a.li@intel.com>

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Wenjie Li
> Sent: Friday, January 11, 2019 3:46 PM
> To: dts@dpdk.org
> Cc: Li, WenjieX A <wenjiex.a.li@intel.com>
> Subject: [dts] [PATCH V1] fix crc strip only supports 2 ports env issue
> 
> Before update, crc_keep and crc_strip only support 2 ports env; now it could
> support all ports(not only 2).
> 
> Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
> ---
>  tests/TestSuite_shutdown_api.py | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/TestSuite_shutdown_api.py b/tests/TestSuite_shutdown_api.py
> index ba4c6cb..9f3f03f 100644
> --- a/tests/TestSuite_shutdown_api.py
> +++ b/tests/TestSuite_shutdown_api.py
> @@ -268,7 +268,11 @@ class TestShutdownApi(TestCase):
>          self.pmdout.start_testpmd("Default", "--portmask=%s --port-
> topology=loop --disable-crc-strip" % utils.create_mask(self.ports),
> socket=self.ports_socket)
>          out = self.dut.send_expect("show config rxtx", "testpmd> ")
>          Rx_offloads = re.compile('Rx offloads=(.*?)\s+?').findall(out, re.S)
> -        crc_keep = int(Rx_offloads[0],16) & RX_OFFLOAD_KEEP_CRC and
> int(Rx_offloads[1],16) & RX_OFFLOAD_KEEP_CRC
> +        crc_keep_temp = []
> +        for i in range(len(self.dut.get_ports())):
> +            crc_keep_temp.append(int(Rx_offloads[i],16) &
> RX_OFFLOAD_KEEP_CRC)
> +            crc_keep = crc_keep_temp[0]
> +            crc_keep = crc_keep and crc_keep_temp[i]
>          self.verify(
>              crc_keep == RX_OFFLOAD_KEEP_CRC, "CRC keeping not enabled
> properly")
> 
> @@ -278,7 +282,11 @@ class TestShutdownApi(TestCase):
>          self.dut.send_expect("port start all", "testpmd> ", 100)
>          out = self.dut.send_expect("show config rxtx", "testpmd> ")
>          Rx_offloads = re.compile('Rx offloads=(.*?)\s+?').findall(out, re.S)
> -        crc_strip = int(Rx_offloads[0],16) | ~RX_OFFLOAD_KEEP_CRC and
> int(Rx_offloads[1],16) | ~RX_OFFLOAD_KEEP_CRC
> +        crc_strip_temp = []
> +        for i in range(len(self.dut.get_ports())):
> +            crc_strip_temp.append(int(Rx_offloads[i],16) |
> ~RX_OFFLOAD_KEEP_CRC)
> +            crc_strip = crc_strip_temp[0]
> +            crc_strip = crc_strip and crc_strip_temp[i]
>          self.verify(
>              crc_strip == ~RX_OFFLOAD_KEEP_CRC, "CRC stripping not enabled
> properly")
>          self.dut.send_expect("start", "testpmd> ")
> --
> 2.17.2

      parent reply	other threads:[~2019-01-15  5:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-11  7:45 Wenjie Li
2019-01-12  8:09 ` Wu, ChangqingX
2019-01-15  5:58 ` 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=8CE3E05A3F976642AAB0F4675D0AD20E0BA0299F@SHSMSX101.ccr.corp.intel.com \
    --to=lijuan.tu@intel.com \
    --cc=dts@dpdk.org \
    --cc=wenjiex.a.li@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).