test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "An, XiangX" <xiangx.an@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Peng, Yuan" <yuan.peng@intel.com>, "An, XiangX" <xiangx.an@intel.com>
Subject: Re: [dts] [PATCH V5 1/2] tests/cvl_advanced_rss_gtpogre: add case parse_pfcp_over_gre_packet
Date: Wed, 9 Jun 2021 07:04:50 +0000	[thread overview]
Message-ID: <677a9a2765ba43209167bc14c3ffaa25@intel.com> (raw)
In-Reply-To: <1623047479-221222-2-git-send-email-xiangx.an@intel.com>



> -----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


  reply	other threads:[~2021-06-09  7:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=677a9a2765ba43209167bc14c3ffaa25@intel.com \
    --to=lijuan.tu@intel.com \
    --cc=dts@dpdk.org \
    --cc=xiangx.an@intel.com \
    --cc=yuan.peng@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).