[dts] [PATCH] tests/ddp_mpls: fix nic support and core reset issues

Tu, Lijuan lijuan.tu at intel.com
Fri Jan 11 09:26:52 CET 2019


Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Xueqin Lin
> Sent: Tuesday, January 8, 2019 2:16 PM
> To: dts at dpdk.org
> Cc: Lin, Xueqin <xueqin.lin at intel.com>
> Subject: [dts] [PATCH] tests/ddp_mpls: fix nic support and core reset issues
> 
> From: "xueqin.lin" <xueqin.lin at intel.com>
> 
> 1. DDP MPLs could support FVL nic, not only fortville_25g.
> 2. Restore original profile instead of core reset to avoid exception.
> 
> Signed-off-by: Xueqin Lin <xueqin.lin at intel.com>
> 
> ---
>  tests/TestSuite_ddp_mpls.py | 26 ++++++++++++++++----------
>  1 file changed, 16 insertions(+), 10 deletions(-)
> 
> diff --git a/tests/TestSuite_ddp_mpls.py b/tests/TestSuite_ddp_mpls.py index
> 691e958..b002788 100644
> --- a/tests/TestSuite_ddp_mpls.py
> +++ b/tests/TestSuite_ddp_mpls.py
> @@ -18,8 +18,8 @@ VF_MAX_QUEUE = 4
>  class Testddp_mpls(TestCase):
> 
>      def set_up_all(self):
> -        self.verify(self.nic in ['fortville_25g'],
> -            'ddp mpls can not support %s nic' % self.nic)
> +        self.verify('fortville' in self.nic,
> +                    'ddp mpls can not support %s nic' % self.nic)
>          self.dut_ports = self.dut.get_ports(self.nic)
>          self.verify(len(self.dut_ports) >= 1, "Insufficient ports")
>          self.vm0 = None
> @@ -123,7 +123,7 @@ class Testddp_mpls(TestCase):
>          out = self.dut_testpmd.execute_cmd('ddp get list 0')
>          self.verify("Profile number is: 0" in out,
>              "Failed to get ddp profile info list!!!")
> -        self.dut_testpmd.execute_cmd('ddp add 0 /tmp/mpls.pkgo')
> +        self.dut_testpmd.execute_cmd('ddp add 0
> + /tmp/mpls.pkgo,/tmp/mpls.bak')
>          out = self.dut_testpmd.execute_cmd('ddp get list 0')
>          self.verify("Profile number is: 1" in out,
>              "Failed to load ddp profile!!!") @@ -224,13 +224,19 @@ class
> Testddp_mpls(TestCase):
> 
> 
>      def tear_down(self):
> -        if self.vm0_testpmd:
> -            self.dut_testpmd.execute_cmd('write reg 0 0xb8190 1')
> -            self.dut_testpmd.execute_cmd('write reg 0 0xb8190 2')
> -            self.vm0_testpmd.quit()
> -            self.dut_testpmd.quit()
> -        self.vm0_dut.kill_all()
> -        pass
> +        self.vm0_testpmd.execute_cmd('stop')
> +        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/mpls.bak')
> +            out = self.dut_testpmd.execute_cmd('ddp get list 0')
> +            self.verify("Profile number is: 0" in out,
> +                        "Failed to delete mpls profile!!!")
> +            self.dut_testpmd.execute_cmd('port start all')
> +        self.vm0_testpmd.quit()
> +        self.dut_testpmd.quit()
> 
> 
>      def tear_down_all(self):
> --
> 2.7.5



More information about the dts mailing list