From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id ACB872BAE for ; Thu, 25 Oct 2018 10:50:21 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Oct 2018 01:50:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,423,1534834800"; d="scan'208";a="81463156" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga008.fm.intel.com with ESMTP; 25 Oct 2018 01:50:20 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 25 Oct 2018 01:50:20 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.102]) by shsmsx102.ccr.corp.intel.com ([169.254.2.84]) with mapi id 14.03.0415.000; Thu, 25 Oct 2018 16:50:18 +0800 From: "Tu, Lijuan" To: "Li, WenjieX A" , "dts@dpdk.org" CC: "Li, WenjieX A" Thread-Topic: [dts] [PATCH V3] tests/shutdown_api: check crc strip bit instead of Rx offloads to verify CRC is enabled or not Thread-Index: AQHUa3lLmaddtL6TrU6FGe02jU7Gy6UvqIGw Date: Thu, 25 Oct 2018 08:50:17 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0B9AC104@SHSMSX101.ccr.corp.intel.com> References: <1540372331-10787-1-git-send-email-wenjiex.a.li@intel.com> In-Reply-To: <1540372331-10787-1-git-send-email-wenjiex.a.li@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTBmZGY1OTAtYWU4OS00ODA3LWE2YWYtMDhhOTcyOTU3YzFmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiYU1iQlgyZzlGS0psN3RaU25EdGVnQ3ptS1RpSklHQlJRblBDakFVODFzbHZGR1JPTTR3OG9FaitpT0NjclAxYiJ9 x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V3] tests/shutdown_api: check crc strip bit instead of Rx offloads to verify CRC is enabled or not X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 08:50:22 -0000 Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of wenjieli > Sent: Wednesday, October 24, 2018 5:12 PM > To: dts@dpdk.org > Cc: Li, WenjieX A > Subject: [dts] [PATCH V3] tests/shutdown_api: check crc strip bit instead= of > Rx offloads to verify CRC is enabled or not >=20 > If crc strip is enabled, the crc strip bit (bit 16) is 0, else it is 1. > Use this bit to check crc is enabled or not, will not just check the Rx o= ffloads > value in output. >=20 > Signed-off-by: wenjieli > --- > tests/TestSuite_shutdown_api.py | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) >=20 > diff --git a/tests/TestSuite_shutdown_api.py > b/tests/TestSuite_shutdown_api.py index 52a8fbf..1282cf7 100644 > --- a/tests/TestSuite_shutdown_api.py > +++ b/tests/TestSuite_shutdown_api.py > @@ -263,18 +263,24 @@ class TestShutdownApi(TestCase): > """ > Reconfigure All Ports With The Same Configurations (CRC) > """ > + RX_OFFLOAD_KEEP_CRC =3D 0x10000 > + > self.pmdout.start_testpmd("Default", "--portmask=3D%s > --port-topology=3Dloop --disable-crc-strip" % utils.create_mask(self.port= s), > socket=3Dself.ports_socket) > out =3D self.dut.send_expect("show config rxtx", "testpmd> ") > + Rx_offloads =3D re.compile('Rx offloads=3D(.*?)\s+?').findall(ou= t, re.S) > + crc_keep =3D int(Rx_offloads[0],16) & RX_OFFLOAD_KEEP_CRC and > + int(Rx_offloads[1],16) & RX_OFFLOAD_KEEP_CRC > self.verify( > - "Rx offloads=3D0x10000" in out, "CRC keeping not enabled > properly") > + crc_keep =3D=3D RX_OFFLOAD_KEEP_CRC, "CRC keeping not > enabled > + properly") >=20 > 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 =3D self.dut.send_expect("show config rxtx", "testpmd> ") > + Rx_offloads =3D re.compile('Rx offloads=3D(.*?)\s+?').findall(ou= t, re.S) > + crc_strip =3D int(Rx_offloads[0],16) | ~RX_OFFLOAD_KEEP_CRC and > + int(Rx_offloads[1],16) | ~RX_OFFLOAD_KEEP_CRC > self.verify( > - "Rx offloads=3D0x1000" in out, "CRC stripping not enabled > properly") > + crc_strip =3D=3D ~RX_OFFLOAD_KEEP_CRC, "CRC stripping not > + enabled properly") > self.dut.send_expect("start", "testpmd> ") > self.check_forwarding() >=20 > -- > 2.17.2