[dts] [PATCH] tests/dynamic_flowtype: fix dynamic flowtype issues

Tu, Lijuan lijuan.tu at intel.com
Tue Jan 15 05:55:54 CET 2019


Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Xueqin Lin
> Sent: Tuesday, January 8, 2019 12:28 PM
> To: dts at dpdk.org
> Cc: Lin, Xueqin <xueqin.lin at intel.com>
> Subject: [dts] [PATCH] tests/dynamic_flowtype: fix dynamic flowtype issues
> 
> From: "xueqin.lin" <xueqin.lin at intel.com>
> 
> 1. Dynamic flowtype could support FVL nic, not only fortville_25g.
> 2. RSS works also could receive packets from queue 0.
> 3. Restore original profile instead of core reset to avoid exception.
> 
> Signed-off-by: Xueqin Lin <xueqin.lin at intel.com>
> 
> ---
>  tests/TestSuite_dynamic_flowtype.py | 21 +++++++++++++--------
>  1 file changed, 13 insertions(+), 8 deletions(-)
> 
> diff --git a/tests/TestSuite_dynamic_flowtype.py
> b/tests/TestSuite_dynamic_flowtype.py
> index 05e6bcb..4652955 100644
> --- a/tests/TestSuite_dynamic_flowtype.py
> +++ b/tests/TestSuite_dynamic_flowtype.py
> @@ -12,7 +12,7 @@ VM_CORES_MASK = 'all'
>  class TestDynamicFlowtype(TestCase):
> 
>      def set_up_all(self):
> -        self.verify(self.nic in ['fortville_25g'],
> +        self.verify('fortville' in self.nic,
>                      'dynamic flow type mapping can not support %s nic'
>                      % self.nic)
>          ports = self.dut.get_ports()
> @@ -61,7 +61,7 @@ class TestDynamicFlowtype(TestCase):
>          self.dut_testpmd.execute_cmd('port stop all')
>          time.sleep(1)
>          out = self.dut_testpmd.execute_cmd('ddp get list 0')
> -        self.dut_testpmd.execute_cmd('ddp add 0 /tmp/gtp.pkgo')
> +        self.dut_testpmd.execute_cmd('ddp add 0
> + /tmp/gtp.pkgo,/tmp/gtp.bak')
>          out = self.dut_testpmd.execute_cmd('ddp get list 0')
>          self.verify("Profile number is: 1" in out,
>                      "Failed to load ddp profile!!!") @@ -179,8 +179,6 @@ class
> TestDynamicFlowtype(TestCase):
>              self.tester.scapy_execute()
>              out = self.dut.get_session_output(timeout=2)
>              if match_opt == 'matched':
> -                self.verify("port 0/queue 0" not in out,
> -                            "Failed to receive packet in rss queue!!!")
>                  self.verify("PKT_RX_RSS_HASH" in out,
>                              "Failed to receive packet in rss queue!!!")
>              elif match_opt == 'not matched':
> @@ -280,10 +278,17 @@ class TestDynamicFlowtype(TestCase):
>          self.dynamic_flowtype_test(pctype=25, flowtype=25, reset=False)
> 
>      def tear_down(self):
> -        if self.dut_testpmd:
> -            self.dut_testpmd.execute_cmd('write reg 0 0xb8190 1')
> -            self.dut_testpmd.execute_cmd('write reg 0 0xb8190 2')
> -            self.dut_testpmd.quit()
> +        self.dut_testpmd.execute_cmd('stop')
> +        out = self.dut_testpmd.execute_cmd('ddp get list 0')
> +        if "Profile number is: 0" not in out:
> +            self.dut_testpmd.execute_cmd('port stop all')
> +            time.sleep(1)
> +            self.dut_testpmd.execute_cmd('ddp del 0 /tmp/gtp.bak')
> +            out = self.dut_testpmd.execute_cmd('ddp get list 0')
> +            self.verify("Profile number is: 0" in out,
> +                        "Failed to delete ddp profile!!!")
> +            self.dut_testpmd.execute_cmd('port start all')
> +        self.dut_testpmd.quit()
> 
>      def tear_down_all(self):
>          self.dut.kill_all()
> --
> 2.7.5



More information about the dts mailing list