From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 20860A0C46; Wed, 9 Jun 2021 09:05:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E28FF410DE; Wed, 9 Jun 2021 09:04:59 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 76CFD40E3C for ; Wed, 9 Jun 2021 09:04:57 +0200 (CEST) IronPort-SDR: ozSgDNRGvJ3sdcbS7/c6CBqBiJ9Q220sZOHnWEpRPU1+ledSLb+bAXeUThZ4PEgHM3wvnDCcRQ lyXEh3GvzW4A== X-IronPort-AV: E=McAfee;i="6200,9189,10009"; a="201994084" X-IronPort-AV: E=Sophos;i="5.83,260,1616482800"; d="scan'208";a="201994084" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2021 00:04:54 -0700 IronPort-SDR: tH5ZE0x0aJWfae412kCUXzJF5QSkv6YlzWW73yULa34OSg4LQ9MiHFhq5QHaLI7JymdIM2K1hF 4c8DKhxmmepw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,260,1616482800"; d="scan'208";a="440754497" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga007.jf.intel.com with ESMTP; 09 Jun 2021 00:04:53 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Wed, 9 Jun 2021 00:04:53 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Wed, 9 Jun 2021 15:04:51 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2242.008; Wed, 9 Jun 2021 15:04:51 +0800 From: "Tu, Lijuan" To: "An, XiangX" , "dts@dpdk.org" CC: "Peng, Yuan" , "An, XiangX" Thread-Topic: [dts] [PATCH V5 1/2] tests/cvl_advanced_rss_gtpogre: add case parse_pfcp_over_gre_packet Thread-Index: AQHXW2ViLJK62WX8Rk+JdZVONYL4AasLRCug Date: Wed, 9 Jun 2021 07:04:50 +0000 Message-ID: <677a9a2765ba43209167bc14c3ffaa25@intel.com> References: <1623047479-221222-1-git-send-email-xiangx.an@intel.com> <1623047479-221222-2-git-send-email-xiangx.an@intel.com> In-Reply-To: <1623047479-221222-2-git-send-email-xiangx.an@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V5 1/2] tests/cvl_advanced_rss_gtpogre: add case parse_pfcp_over_gre_packet X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" > -----Original Message----- > From: dts On Behalf Of Xiang An > Sent: 2021=1B$BG/=1B(B6=1B$B7n=1B(B7=1B$BF|=1B(B 14:31 > To: dts@dpdk.org > Cc: Peng, Yuan ; An, XiangX > Subject: [dts] [PATCH V5 1/2] tests/cvl_advanced_rss_gtpogre: add case > parse_pfcp_over_gre_packet >=20 > Signed-off-by: Xiang An > --- > tests/TestSuite_cvl_advanced_rss_gtpogre.py | 55 > +++++++++++++++++++++++++++++ > 1 file changed, 55 insertions(+) >=20 > diff --git a/tests/TestSuite_cvl_advanced_rss_gtpogre.py > b/tests/TestSuite_cvl_advanced_rss_gtpogre.py > index 4a889ea..17029a8 100755 > --- a/tests/TestSuite_cvl_advanced_rss_gtpogre.py > +++ b/tests/TestSuite_cvl_advanced_rss_gtpogre.py > @@ -3503,7 +3503,62 @@ class TestCVLAdvancedRSSGTPoGRE(TestCase): > self.switch_testpmd(enable_rss=3DTrue) >=20 > self.rssprocess.handle_rss_distribute_cases(cases_info=3Dinner_l4_protoca= l_hash) >=20 > + def change_dpdk_code(self): > + """ > + change dpdk's code to show the PFCP ptype > + """ > + file1 =3D "drivers/net/ice/ice_rxtx.c" > + file2 =3D "drivers/net/ice/ice_rxtx_vec_avx2.c" > + match1 =3D "rte_le_to_cpu_16(rxdp\[j\].wb.ptype_flex_flags0)\];" > + match2 =3D "const uint16_t ptype0 =3D _mm256_extract_epi16(ptype= s0_1, 1);" > + insert1 =3D "printf(\"ptype: %d\\\\n\", ICE_RX_FLEX_DESC_PTYPE_M= & > rte_le_to_cpu_16(rxdp\[j\].wb.ptype_flex_flags0));" > + insert2 =3D "printf(\"ptype: %d\\\\n\", ptype0);" > + > + self.dut.send_expect("rm -rf drivers/net/ice/ice_rxtx.c_bak", "#= ") > + self.dut.send_expect("cp -rf drivers/net/ice/ice_rxtx.c > drivers/net/ice/ice_rxtx.c_bak", "# ") > + self.dut.send_expect("rm -rf drivers/net/ice/ice_rxtx_vec_avx2.c= _bak", "# > ") > + self.dut.send_expect("cp -rf drivers/net/ice/ice_rxtx_vec_avx2.c > drivers/net/ice/ice_rxtx_vec_avx2.c_bak", "# ") > + self.dut.send_expect("sed -i '/%s/a\%s' %s"%(match1,insert1,file= 1), "# ") > + self.dut.send_expect("sed -i '/%s/a\%s' %s"%(match2,insert2,file= 2), "# ") Only test avx2 ? does avx512 support it =1B$B!)=1B(Bit should be considere= d too. > + > + def recovery_dpdk_code(self): > + """ > + Recovery dpdk's code after the case finished > + """ > + self.dut.send_expect("rm -rf drivers/net/ice/ice_rxtx.c", "# ") > + self.dut.send_expect("cp -rf drivers/net/ice/ice_rxtx.c_bak > drivers/net/ice/ice_rxtx.c", "# ") > + self.dut.send_expect("rm -rf drivers/net/ice/ice_rxtx_vec_avx2.c= ", "# ") > + self.dut.send_expect("cp -rf drivers/net/ice/ice_rxtx_vec_avx2.c= _bak > drivers/net/ice/ice_rxtx_vec_avx2.c", "# ") > + > + def test_parse_pfcp_over_gre_packet(self): > + self.pmd_output.quit() > + self.change_dpdk_code() > + self.dut.build_install_dpdk(self.dut.target) > + > + pkt1 =3D > 'Ether(dst=3D"00:11:22:33:44:55")/IP(proto=3D0x2F)/GRE(proto=3D0x0800)/IP= ()/UDP(sp > ort=3D22, dport=3D8805)/PFCP(S=3D0)' > + pkt2 =3D > 'Ether(dst=3D"00:11:22:33:44:55")/IP(proto=3D0x2F)/GRE(proto=3D0x0800)/IP= ()/UDP(sp > ort=3D22, dport=3D8805)/PFCP(S=3D1, seid=3D123)' > + pkt3 =3D > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(nh=3D0x2F)/GRE(proto=3D0x86dd)/IPv= 6()/UDP( > sport=3D22, dport=3D8805)/PFCP(S=3D0)' > + pkt4 =3D > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(nh=3D0x2F)/GRE(proto=3D0x86dd)/IPv= 6()/UDP( > sport=3D22, dport=3D8805)/PFCP(S=3D1, seid=3D256)' > + pkts =3D [pkt1, pkt2, pkt3, pkt4] > + p =3D Packet() > + for i in pkts: > + p.append_pkt(i) > + self.switch_testpmd(enable_rss=3DTrue) > + p.send_pkt(self.tester, tx_port=3Dself.tester_iface0) > + out =3D self.pmd_output.get_output(timeout=3D1) > + > + self.verify('ptype: 351' in out,'some subcase failed') > + self.verify('ptype: 352' in out,'some subcase failed') > + self.verify('ptype: 353' in out,'some subcase failed') > + self.verify('ptype: 354' in out,'some subcase failed') > + > def tear_down(self): > + #Judge the currently running case > + if self.running_case =3D=3D "test_parse_pfcp_over_gre_packet" : > + self.pmd_output.quit() > + self.recovery_dpdk_code() > + self.dut.build_install_dpdk(self.dut.target) > + self.switch_testpmd(enable_rss=3DFalse) > # destroy all flow rule on port 0 > self.dut.send_command("flow flush 0", timeout=3D1) > self.dut.send_command("clear port stats all", timeout=3D1) > -- > 1.8.3.1