[dts] [PATCH V1] shutdown_api/reconfigure_ports: change DEV_RX_OFFLOAD_CRC_STRIP from 0x1000 to 0x0

Tu, Lijuan lijuan.tu at intel.com
Mon Oct 22 04:28:47 CEST 2018


We just need check crc strip bit, no need to check other offloads.
If crc strip enabled, we just check bit 12 is 0, else bit 12 is 1. We don't care about bit 0~11
Moreover, we cannot force the other bits to be 0. Now the other bits are 0, but someday they may be changed to 1.

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of wenjieli
> Sent: Tuesday, October 16, 2018 10:54 AM
> To: dts at dpdk.org
> Cc: Li, WenjieX A <wenjiex.a.li at intel.com>
> Subject: [dts] [PATCH V1] shutdown_api/reconfigure_ports: change
> DEV_RX_OFFLOAD_CRC_STRIP from 0x1000 to 0x0
> 
> "#define DEV_RX_OFFLOAD_CRC_STRIP   0x00001000" was removed from
> dpdk/lib/librte_ethdev/rte_ethdev.h since 33e7b667f18376c603512, the
> expected DEV_RX_OFFLOAD_CRC_STRIP value changed to 0x0; update
> testsuit for this changement.
> 
> Signed-off-by: wenjieli <wenjiex.a.li at intel.com>
> ---
>  tests/TestSuite_shutdown_api.py | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/TestSuite_shutdown_api.py
> b/tests/TestSuite_shutdown_api.py index 52a8fbf..0f8436b 100644
> --- a/tests/TestSuite_shutdown_api.py
> +++ b/tests/TestSuite_shutdown_api.py
> @@ -263,18 +263,18 @@ class TestShutdownApi(TestCase):
>          """
>          Reconfigure All Ports With The Same Configurations (CRC)
>          """
> +        DEV_RX_OFFLOAD_KEEP_CRC="0x10000"
> +        DEV_RX_OFFLOAD_CRC_STRIP="0x0"
>          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> ")
> -        self.verify(
> -            "Rx offloads=0x10000" in out, "CRC keeping not enabled
> properly")
> +        self.verify("Rx offloads=%s" % DEV_RX_OFFLOAD_KEEP_CRC in
> out,
> + "CRC keeping not enabled properly")
> 
>          self.dut.send_expect("port stop all", "testpmd> ", 100)
>          self.dut.send_expect("port config all crc-strip on", "testpmd> ")
>          self.dut.send_expect("set fwd mac", "testpmd>")
>          self.dut.send_expect("port start all", "testpmd> ", 100)
>          out = self.dut.send_expect("show config rxtx", "testpmd> ")
> -        self.verify(
> -            "Rx offloads=0x1000" in out, "CRC stripping not enabled
> properly")
> +        self.verify("Rx offloads=%s" % DEV_RX_OFFLOAD_CRC_STRIP in
> out,
[Lijuan]Only check crc strip bit here, don't check other bit. if Rx offloads=0xe111, it also should pass in the case.
> + "CRC stripping not enabled properly")
>          self.dut.send_expect("start", "testpmd> ")
>          self.check_forwarding()
> 
> --
> 2.17.2



More information about the dts mailing list