* [dts] [PATCH V5 0/2] tests/rss_gtpogre: add a new case to PF and VF gtpogre @ 2021-06-07 6:31 Xiang An 2021-06-07 6:31 ` [dts] [PATCH V5 1/2] tests/cvl_advanced_rss_gtpogre: add case parse_pfcp_over_gre_packet Xiang An ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Xiang An @ 2021-06-07 6:31 UTC (permalink / raw) To: dts; +Cc: yuan.peng, Xiang An v5: - at v4, forget recovery a dpdk file, v5 have fix it v4: - optimize the dts script with add a print for dpdk v3: - Revised title v2: - fix the Trailing blanks in suite: cvl_advanced_rss_gtpogre v1: - add a case 'parse_pfcp_over_gre_packet' Xiang An (2): tests/cvl_advanced_rss_gtpogre: add case parse_pfcp_over_gre_packet tests/cvl_advanced_iavf_rss_gtpogre: add case parse_pfcp_over_gre_packet tests/TestSuite_cvl_advanced_iavf_rss_gtpogre.py | 55 ++++++++++++++++++++++++ tests/TestSuite_cvl_advanced_rss_gtpogre.py | 55 ++++++++++++++++++++++++ 2 files changed, 110 insertions(+) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH V5 1/2] tests/cvl_advanced_rss_gtpogre: add case parse_pfcp_over_gre_packet 2021-06-07 6:31 [dts] [PATCH V5 0/2] tests/rss_gtpogre: add a new case to PF and VF gtpogre Xiang An @ 2021-06-07 6:31 ` Xiang An 2021-06-09 7:04 ` Tu, Lijuan 2021-06-07 6:31 ` [dts] [PATCH V5 2/2] tests/cvl_advanced_iavf_rss_gtpogre: " Xiang An 2021-06-07 6:33 ` [dts] [PATCH V5 0/2] tests/rss_gtpogre: add a new case to PF and VF gtpogre Peng, Yuan 2 siblings, 1 reply; 7+ messages in thread From: Xiang An @ 2021-06-07 6:31 UTC (permalink / raw) To: dts; +Cc: yuan.peng, Xiang An Signed-off-by: Xiang An <xiangx.an@intel.com> --- tests/TestSuite_cvl_advanced_rss_gtpogre.py | 55 +++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) 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=True) self.rssprocess.handle_rss_distribute_cases(cases_info=inner_l4_protocal_hash) + def change_dpdk_code(self): + """ + change dpdk's code to show the PFCP ptype + """ + file1 = "drivers/net/ice/ice_rxtx.c" + file2 = "drivers/net/ice/ice_rxtx_vec_avx2.c" + match1 = "rte_le_to_cpu_16(rxdp\[j\].wb.ptype_flex_flags0)\];" + match2 = "const uint16_t ptype0 = _mm256_extract_epi16(ptypes0_1, 1);" + insert1 = "printf(\"ptype: %d\\\\n\", ICE_RX_FLEX_DESC_PTYPE_M & rte_le_to_cpu_16(rxdp\[j\].wb.ptype_flex_flags0));" + insert2 = "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,file1), "# ") + self.dut.send_expect("sed -i '/%s/a\%s' %s"%(match2,insert2,file2), "# ") + + 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 = 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(sport=22, dport=8805)/PFCP(S=0)' + pkt2 = 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(sport=22, dport=8805)/PFCP(S=1, seid=123)' + pkt3 = 'Ether(dst="00:11:22:33:44:55")/IPv6(nh=0x2F)/GRE(proto=0x86dd)/IPv6()/UDP(sport=22, dport=8805)/PFCP(S=0)' + pkt4 = 'Ether(dst="00:11:22:33:44:55")/IPv6(nh=0x2F)/GRE(proto=0x86dd)/IPv6()/UDP(sport=22, dport=8805)/PFCP(S=1, seid=256)' + pkts = [pkt1, pkt2, pkt3, pkt4] + p = Packet() + for i in pkts: + p.append_pkt(i) + self.switch_testpmd(enable_rss=True) + p.send_pkt(self.tester, tx_port=self.tester_iface0) + out = self.pmd_output.get_output(timeout=1) + + 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 == "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=False) # destroy all flow rule on port 0 self.dut.send_command("flow flush 0", timeout=1) self.dut.send_command("clear port stats all", timeout=1) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dts] [PATCH V5 1/2] tests/cvl_advanced_rss_gtpogre: add case parse_pfcp_over_gre_packet 2021-06-07 6:31 ` [dts] [PATCH V5 1/2] tests/cvl_advanced_rss_gtpogre: add case parse_pfcp_over_gre_packet Xiang An @ 2021-06-09 7:04 ` Tu, Lijuan 0 siblings, 0 replies; 7+ messages in thread From: Tu, Lijuan @ 2021-06-09 7:04 UTC (permalink / raw) To: An, XiangX, dts; +Cc: Peng, Yuan, An, XiangX > -----Original Message----- > From: dts <dts-bounces@dpdk.org> On Behalf Of Xiang An > Sent: 2021年6月7日 14:31 > To: dts@dpdk.org > Cc: Peng, Yuan <yuan.peng@intel.com>; An, XiangX <xiangx.an@intel.com> > Subject: [dts] [PATCH V5 1/2] tests/cvl_advanced_rss_gtpogre: add case > parse_pfcp_over_gre_packet > > Signed-off-by: Xiang An <xiangx.an@intel.com> > --- > tests/TestSuite_cvl_advanced_rss_gtpogre.py | 55 > +++++++++++++++++++++++++++++ > 1 file changed, 55 insertions(+) > > 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=True) > > self.rssprocess.handle_rss_distribute_cases(cases_info=inner_l4_protocal_hash) > > + def change_dpdk_code(self): > + """ > + change dpdk's code to show the PFCP ptype > + """ > + file1 = "drivers/net/ice/ice_rxtx.c" > + file2 = "drivers/net/ice/ice_rxtx_vec_avx2.c" > + match1 = "rte_le_to_cpu_16(rxdp\[j\].wb.ptype_flex_flags0)\];" > + match2 = "const uint16_t ptype0 = _mm256_extract_epi16(ptypes0_1, 1);" > + insert1 = "printf(\"ptype: %d\\\\n\", ICE_RX_FLEX_DESC_PTYPE_M & > rte_le_to_cpu_16(rxdp\[j\].wb.ptype_flex_flags0));" > + insert2 = "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,file1), "# ") > + self.dut.send_expect("sed -i '/%s/a\%s' %s"%(match2,insert2,file2), "# ") Only test avx2 ? does avx512 support it ?it should be considered 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 = > 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(sp > ort=22, dport=8805)/PFCP(S=0)' > + pkt2 = > 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(sp > ort=22, dport=8805)/PFCP(S=1, seid=123)' > + pkt3 = > 'Ether(dst="00:11:22:33:44:55")/IPv6(nh=0x2F)/GRE(proto=0x86dd)/IPv6()/UDP( > sport=22, dport=8805)/PFCP(S=0)' > + pkt4 = > 'Ether(dst="00:11:22:33:44:55")/IPv6(nh=0x2F)/GRE(proto=0x86dd)/IPv6()/UDP( > sport=22, dport=8805)/PFCP(S=1, seid=256)' > + pkts = [pkt1, pkt2, pkt3, pkt4] > + p = Packet() > + for i in pkts: > + p.append_pkt(i) > + self.switch_testpmd(enable_rss=True) > + p.send_pkt(self.tester, tx_port=self.tester_iface0) > + out = self.pmd_output.get_output(timeout=1) > + > + 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 == "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=False) > # destroy all flow rule on port 0 > self.dut.send_command("flow flush 0", timeout=1) > self.dut.send_command("clear port stats all", timeout=1) > -- > 1.8.3.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH V5 2/2] tests/cvl_advanced_iavf_rss_gtpogre: add case parse_pfcp_over_gre_packet 2021-06-07 6:31 [dts] [PATCH V5 0/2] tests/rss_gtpogre: add a new case to PF and VF gtpogre Xiang An 2021-06-07 6:31 ` [dts] [PATCH V5 1/2] tests/cvl_advanced_rss_gtpogre: add case parse_pfcp_over_gre_packet Xiang An @ 2021-06-07 6:31 ` Xiang An 2021-06-07 6:33 ` [dts] [PATCH V5 0/2] tests/rss_gtpogre: add a new case to PF and VF gtpogre Peng, Yuan 2 siblings, 0 replies; 7+ messages in thread From: Xiang An @ 2021-06-07 6:31 UTC (permalink / raw) To: dts; +Cc: yuan.peng, Xiang An Signed-off-by: Xiang An <xiangx.an@intel.com> --- tests/TestSuite_cvl_advanced_iavf_rss_gtpogre.py | 55 ++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/tests/TestSuite_cvl_advanced_iavf_rss_gtpogre.py b/tests/TestSuite_cvl_advanced_iavf_rss_gtpogre.py index 5d5d7ee..193c478 100755 --- a/tests/TestSuite_cvl_advanced_iavf_rss_gtpogre.py +++ b/tests/TestSuite_cvl_advanced_iavf_rss_gtpogre.py @@ -2532,7 +2532,62 @@ class TestCVLAdvancedIAVFRSSGTPoGRE(TestCase): self.switch_testpmd(symmetric=True) self.rssprocess.handle_rss_distribute_cases(cases_info=inner_l4_protocal_hash) + def change_dpdk_code(self): + """ + change dpdk's code to show the PFCP ptype + """ + file1 = "drivers/net/iavf/iavf_rxtx.c" + file2 = "drivers/net/iavf/iavf_rxtx_vec_avx2.c" + match1 = "rte_le_to_cpu_16(rxdp\[j\].wb.ptype_flex_flags0)\];" + insert1 = "printf(\"ptype: %d\\\\n\", IAVF_RX_FLEX_DESC_PTYPE_M & rte_le_to_cpu_16(rxdp\[j\].wb.ptype_flex_flags0));" + match2 = "const uint16_t ptype0 = _mm256_extract_epi16(ptypes0_1, 1);" + insert2 = "printf(\"ptype: %d\\\\n\", ptype0);" + + self.dut.send_expect("rm -rf drivers/net/iavf/iavf_rxtx.c_bak", "# ") + self.dut.send_expect("cp -rf drivers/net/iavf/iavf_rxtx.c drivers/net/iavf/iavf_rxtx.c_bak", "# ") + self.dut.send_expect("sed -i '/%s/a\%s' %s" % (match1, insert1, file1), "# ") + self.dut.send_expect("rm -rf drivers/net/iavf/iavf_rxtx_vec_avx2.c_bak", "# ") + self.dut.send_expect("cp -rf drivers/net/iavf/iavf_rxtx_vec_avx2.c drivers/net/iavf/iavf_rxtx_vec_avx2.c_bak", "# ") + self.dut.send_expect("sed -i '/%s/a\%s' %s" % (match2, insert2, file2), "# ") + + def recovery_dpdk_code(self): + """ + Recovery dpdk's code after the case finished + """ + self.dut.send_expect("rm -rf drivers/net/iavf/iavf_rxtx.c", "# ") + self.dut.send_expect("cp -rf drivers/net/iavf/iavf_rxtx.c_bak drivers/net/iavf/iavf_rxtx.c", "# ") + self.dut.send_expect("rm -rf drivers/net/iavf/iavf_rxtx_vec_avx2.c", "# ") + self.dut.send_expect("cp -rf drivers/net/iavf/iavf_rxtx_vec_avx2.c_bak drivers/net/iavf/iavf_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 = 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(sport=22, dport=8805)/PFCP(S=0)' + pkt2 = 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(sport=22, dport=8805)/PFCP(S=1, seid=123)' + pkt3 = 'Ether(dst="00:11:22:33:44:55")/IPv6(nh=0x2F)/GRE(proto=0x86dd)/IPv6()/UDP(sport=22, dport=8805)/PFCP(S=0)' + pkt4 = 'Ether(dst="00:11:22:33:44:55")/IPv6(nh=0x2F)/GRE(proto=0x86dd)/IPv6()/UDP(sport=22, dport=8805)/PFCP(S=1, seid=256)' + pkts = [pkt1, pkt2, pkt3, pkt4] + p = Packet() + for i in pkts: + p.append_pkt(i) + self.switch_testpmd(symmetric=True) + p.send_pkt(self.tester, tx_port=self.tester_iface0) + out = self.pmd_output.get_output(timeout=1) + + 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 == "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(symmetric=True) # destroy all flow rule on port 0 self.dut.send_command("flow flush 0", timeout=1) self.dut.send_command("clear port stats all", timeout=1) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dts] [PATCH V5 0/2] tests/rss_gtpogre: add a new case to PF and VF gtpogre 2021-06-07 6:31 [dts] [PATCH V5 0/2] tests/rss_gtpogre: add a new case to PF and VF gtpogre Xiang An 2021-06-07 6:31 ` [dts] [PATCH V5 1/2] tests/cvl_advanced_rss_gtpogre: add case parse_pfcp_over_gre_packet Xiang An 2021-06-07 6:31 ` [dts] [PATCH V5 2/2] tests/cvl_advanced_iavf_rss_gtpogre: " Xiang An @ 2021-06-07 6:33 ` Peng, Yuan 2021-06-07 9:01 ` David Marchand 2 siblings, 1 reply; 7+ messages in thread From: Peng, Yuan @ 2021-06-07 6:33 UTC (permalink / raw) To: An, XiangX, dts Acked-by Peng, Yuan <yuan.peng@intel.com> -----Original Message----- From: An, XiangX <xiangx.an@intel.com> Sent: Monday, June 7, 2021 2:31 PM To: dts@dpdk.org Cc: Peng, Yuan <yuan.peng@intel.com>; An, XiangX <xiangx.an@intel.com> Subject: [dts][PATCH V5 0/2] tests/rss_gtpogre: add a new case to PF and VF gtpogre ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dts] [PATCH V5 0/2] tests/rss_gtpogre: add a new case to PF and VF gtpogre 2021-06-07 6:33 ` [dts] [PATCH V5 0/2] tests/rss_gtpogre: add a new case to PF and VF gtpogre Peng, Yuan @ 2021-06-07 9:01 ` David Marchand 2021-06-07 19:41 ` Honnappa Nagarahalli 0 siblings, 1 reply; 7+ messages in thread From: David Marchand @ 2021-06-07 9:01 UTC (permalink / raw) To: Peng, Yuan Cc: An, XiangX, dts, techboard, Honnappa Nagarahalli, Juraj Linkeš, Thomas Monjalon On Mon, Jun 7, 2021 at 8:33 AM Peng, Yuan <yuan.peng@intel.com> wrote: > > Acked-by Peng, Yuan <yuan.peng@intel.com> NAK on this series. Please, stop changing DPDK sources in the test tool. -- David Marchand ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dts] [PATCH V5 0/2] tests/rss_gtpogre: add a new case to PF and VF gtpogre 2021-06-07 9:01 ` David Marchand @ 2021-06-07 19:41 ` Honnappa Nagarahalli 0 siblings, 0 replies; 7+ messages in thread From: Honnappa Nagarahalli @ 2021-06-07 19:41 UTC (permalink / raw) To: David Marchand, Peng, Yuan Cc: An, XiangX, dts, techboard, Juraj Linkeš, thomas, Lijuan Tu, nd, Honnappa Nagarahalli, nd + Lijuan <snip> > > On Mon, Jun 7, 2021 at 8:33 AM Peng, Yuan <yuan.peng@intel.com> wrote: > > > > Acked-by Peng, Yuan <yuan.peng@intel.com> > > NAK on this series. > Please, stop changing DPDK sources in the test tool. +1 Hi Yuan/An, I am not sure if you are aware of a DTS WG that the Techboard has setup. The goal of this WG is to find a path to make it mandatory to submit a DTS test case along with the patches to DPDK. One ask from this WG is that the test case should not modify the DPDK code to ensure we are testing a sane code base. While writing the test case, please think if the DPDK code lacks something which would benefit overall. You could submit such as patch to the DPDK community rather than changing the code in DTS. You could also submit a bug report which the community can look into. If you need more info, Lijuan from Intel is involved in this WG, she can provide more information. Thank you, Honnappa > > > -- > David Marchand ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-06-16 6:22 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-06-07 6:31 [dts] [PATCH V5 0/2] tests/rss_gtpogre: add a new case to PF and VF gtpogre Xiang An 2021-06-07 6:31 ` [dts] [PATCH V5 1/2] tests/cvl_advanced_rss_gtpogre: add case parse_pfcp_over_gre_packet Xiang An 2021-06-09 7:04 ` Tu, Lijuan 2021-06-07 6:31 ` [dts] [PATCH V5 2/2] tests/cvl_advanced_iavf_rss_gtpogre: " Xiang An 2021-06-07 6:33 ` [dts] [PATCH V5 0/2] tests/rss_gtpogre: add a new case to PF and VF gtpogre Peng, Yuan 2021-06-07 9:01 ` David Marchand 2021-06-07 19:41 ` Honnappa Nagarahalli
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).