test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [dts v1] support dpdk2.0 code
@ 2015-05-20  6:32 huilongx xu
  2015-05-20  8:00 ` Liu, Yong
  0 siblings, 1 reply; 3+ messages in thread
From: huilongx xu @ 2015-05-20  6:32 UTC (permalink / raw)
  To: dts

From: huilong xu <huilongx.xu@intel.com>

changed list:
1. when start testpmd by pmd_output model, if testpmd parameter not include
   "--txqflags=0", add it. because in dpdk2.0 testpmd must used txqflags for
   open hardware features, egg: checsum offload, vlan
2. dut add a function set_default_corelist, if the server cores number more then   4, the default cores is 4. In test case you can used self.dut.default_cores
   to start app.

Signed-off-by: huilong xu <huilongx.xu@intel.com>
---
 framework/dut.py        |   11 +++++++++++
 framework/pmd_output.py |    3 +++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/framework/dut.py b/framework/dut.py
index 5b7aba2..656fc78 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -140,6 +140,16 @@ class Dut(Crb):
         """
         return self.crb['pass']
 
+    def set_default_corelist(self):
+        """
+        set default cors list
+        """
+        core_num = len(self.cores)
+        if core_num <= 4:
+            self.default_cores = "1S/%dC/1T" % core_num
+        else:
+            self.default_cores = "1S/4C/1T"
+
     def dut_prerequisites(self):
         """
         Prerequest function should be called before execute any test case.
@@ -155,6 +165,7 @@ class Dut(Crb):
             self.send_expect('alias sed=gsed', '# ')
 
         self.init_core_list()
+        self.set_default_corelist()
         self.pci_devices_information()
         # scan ports before restore interface
         self.scan_ports()
diff --git a/framework/pmd_output.py b/framework/pmd_output.py
index 97274a5..78b4e4f 100644
--- a/framework/pmd_output.py
+++ b/framework/pmd_output.py
@@ -87,6 +87,9 @@ class PmdOutput():
         return self.command
 
     def start_testpmd(self, cores, param='', eal_param='', socket=0):
+        if "--txqflags" not in param:
+            param += "  --txqflags=0"
+
         core_list = self.dut.get_core_list(cores, socket)
         self.coremask = dts.create_mask(core_list)
         command = "./%s/app/testpmd -c %s -n %d %s -- -i %s" \
-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dts] [dts v1] support dpdk2.0 code
  2015-05-20  6:32 [dts] [dts v1] support dpdk2.0 code huilongx xu
@ 2015-05-20  8:00 ` Liu, Yong
  2015-05-20  8:10   ` Liu, Yong
  0 siblings, 1 reply; 3+ messages in thread
From: Liu, Yong @ 2015-05-20  8:00 UTC (permalink / raw)
  To: Xu, HuilongX, dts

Huilong,

"default_cores" should be moved to test_case.py. All suite shared variable should be defined there.

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of huilongx xu
> Sent: Wednesday, May 20, 2015 2:32 PM
> To: dts@dpdk.org
> Subject: [dts] [dts v1] support dpdk2.0 code
> 
> From: huilong xu <huilongx.xu@intel.com>
> 
> changed list:
> 1. when start testpmd by pmd_output model, if testpmd parameter not
> include
>    "--txqflags=0", add it. because in dpdk2.0 testpmd must used txqflags
> for
>    open hardware features, egg: checsum offload, vlan
> 2. dut add a function set_default_corelist, if the server cores number
> more then   4, the default cores is 4. In test case you can used
> self.dut.default_cores
>    to start app.
> 
> Signed-off-by: huilong xu <huilongx.xu@intel.com>
> ---
>  framework/dut.py        |   11 +++++++++++
>  framework/pmd_output.py |    3 +++
>  2 files changed, 14 insertions(+), 0 deletions(-)
> 
> diff --git a/framework/dut.py b/framework/dut.py
> index 5b7aba2..656fc78 100644
> --- a/framework/dut.py
> +++ b/framework/dut.py
> @@ -140,6 +140,16 @@ class Dut(Crb):
>          """
>          return self.crb['pass']
> 
> +    def set_default_corelist(self):
> +        """
> +        set default cors list
> +        """
> +        core_num = len(self.cores)
> +        if core_num <= 4:
> +            self.default_cores = "1S/%dC/1T" % core_num
> +        else:
> +            self.default_cores = "1S/4C/1T"
> +
>      def dut_prerequisites(self):
>          """
>          Prerequest function should be called before execute any test case.
> @@ -155,6 +165,7 @@ class Dut(Crb):
>              self.send_expect('alias sed=gsed', '# ')
> 
>          self.init_core_list()
> +        self.set_default_corelist()
>          self.pci_devices_information()
>          # scan ports before restore interface
>          self.scan_ports()
> diff --git a/framework/pmd_output.py b/framework/pmd_output.py
> index 97274a5..78b4e4f 100644
> --- a/framework/pmd_output.py
> +++ b/framework/pmd_output.py
> @@ -87,6 +87,9 @@ class PmdOutput():
>          return self.command
> 
>      def start_testpmd(self, cores, param='', eal_param='', socket=0):
> +        if "--txqflags" not in param:
> +            param += "  --txqflags=0"
> +
>          core_list = self.dut.get_core_list(cores, socket)
>          self.coremask = dts.create_mask(core_list)
>          command = "./%s/app/testpmd -c %s -n %d %s -- -i %s" \
> --
> 1.7.4.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dts] [dts v1] support dpdk2.0 code
  2015-05-20  8:00 ` Liu, Yong
@ 2015-05-20  8:10   ` Liu, Yong
  0 siblings, 0 replies; 3+ messages in thread
From: Liu, Yong @ 2015-05-20  8:10 UTC (permalink / raw)
  To: Xu, HuilongX, dts

Some additional comments.

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Liu, Yong
> Sent: Wednesday, May 20, 2015 4:00 PM
> To: Xu, HuilongX; dts@dpdk.org
> Subject: Re: [dts] [dts v1] support dpdk2.0 code
> 
> Huilong,
> 
> "default_cores" should be moved to test_case.py. All suite shared variable
> should be defined there.
> 
> > -----Original Message-----
> > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of huilongx xu
> > Sent: Wednesday, May 20, 2015 2:32 PM
> > To: dts@dpdk.org
> > Subject: [dts] [dts v1] support dpdk2.0 code
> >
> > From: huilong xu <huilongx.xu@intel.com>
> >
> > changed list:
> > 1. when start testpmd by pmd_output model, if testpmd parameter not
> > include
> >    "--txqflags=0", add it. because in dpdk2.0 testpmd must used txqflags
> > for
> >    open hardware features, egg: checsum offload, vlan
> > 2. dut add a function set_default_corelist, if the server cores number
> > more then   4, the default cores is 4. In test case you can used
> > self.dut.default_cores
> >    to start app.
> >
> > Signed-off-by: huilong xu <huilongx.xu@intel.com>
> > ---
> >  framework/dut.py        |   11 +++++++++++
> >  framework/pmd_output.py |    3 +++
> >  2 files changed, 14 insertions(+), 0 deletions(-)
> >
> > diff --git a/framework/dut.py b/framework/dut.py
> > index 5b7aba2..656fc78 100644
> > --- a/framework/dut.py
> > +++ b/framework/dut.py
> > @@ -140,6 +140,16 @@ class Dut(Crb):
> >          """
> >          return self.crb['pass']
> >
> > +    def set_default_corelist(self):
> > +        """
> > +        set default cors list
> > +        """
> > +        core_num = len(self.cores)
> > +        if core_num <= 4:
> > +            self.default_cores = "1S/%dC/1T" % core_num
> > +        else:
> > +            self.default_cores = "1S/4C/1T"
> > +
> >      def dut_prerequisites(self):
> >          """
> >          Prerequest function should be called before execute any test
> case.
> > @@ -155,6 +165,7 @@ class Dut(Crb):
> >              self.send_expect('alias sed=gsed', '# ')
> >
> >          self.init_core_list()
> > +        self.set_default_corelist()
> >          self.pci_devices_information()
> >          # scan ports before restore interface
> >          self.scan_ports()
> > diff --git a/framework/pmd_output.py b/framework/pmd_output.py
> > index 97274a5..78b4e4f 100644
> > --- a/framework/pmd_output.py
> > +++ b/framework/pmd_output.py
> > @@ -87,6 +87,9 @@ class PmdOutput():
> >          return self.command
> >
> >      def start_testpmd(self, cores, param='', eal_param='', socket=0):

Better to handle special cores parameter like "ALL", "Default" here.

> > +        if "--txqflags" not in param:
> > +            param += "  --txqflags=0"
> > +
> >          core_list = self.dut.get_core_list(cores, socket)
> >          self.coremask = dts.create_mask(core_list)
> >          command = "./%s/app/testpmd -c %s -n %d %s -- -i %s" \
> > --
> > 1.7.4.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-20  8:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-20  6:32 [dts] [dts v1] support dpdk2.0 code huilongx xu
2015-05-20  8:00 ` Liu, Yong
2015-05-20  8:10   ` Liu, Yong

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