test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] update framework  for support fortville NIC test.
@ 2015-01-27  3:37 huilongx.xu
  2015-01-27  4:58 ` Liu, Yong
  2015-01-27  5:32 ` Qiu, Michael
  0 siblings, 2 replies; 4+ messages in thread
From: huilongx.xu @ 2015-01-27  3:37 UTC (permalink / raw)
  To: dts

execution_fortville.cfg is the test case list for fortville NIC

crb.py, add fortville NIC kernel driver(i40e) in dts

settings.py, add fortville NIC info in dts

testt_case.py, insmode and used i40e for fortvill NIC

Signed-off-by: huilongx.xu <huilongx.xu@intel.com>
---
 execution_fortville.cfg |   21 +++++++++++++++++++++
 framework/crb.py        |    7 +++++++
 framework/settings.py   |    6 ++++++
 framework/test_case.py  |    4 ++++
 4 files changed, 38 insertions(+), 0 deletions(-)
 create mode 100644 execution_fortville.cfg

diff --git a/execution_fortville.cfg b/execution_fortville.cfg
new file mode 100644
index 0000000..15f2ccf
--- /dev/null
+++ b/execution_fortville.cfg
@@ -0,0 +1,21 @@
+[Execution1]
+crbs=<CRB IP Address>
+drivername=<driver name igb_uio or vfio-pci>
+test_suites=
+    cmdline,
+    hello_world,
+    multiprocess,
+    blacklist
+targets=
+    x86_64-native-linuxapp-gcc
+parameters=nic_type=fortville_eagle:func=true
+
+[Execution2]
+crbs=<Performance CRB IP Address>
+drivername=<driver name igb_uio or vfio-pci>
+test_suites=
+    l2fwd,
+    l3fwd
+targets=
+    x86_64-native-linuxapp-gcc
+parameters=nic_type=fortville_eagle:perf=true
diff --git a/framework/crb.py b/framework/crb.py
index d41f51b..e2e8d92 100644
--- a/framework/crb.py
+++ b/framework/crb.py
@@ -151,6 +151,10 @@ class Crb(object):
         self.send_expect("modprobe e1000", "# ", 20)
         self.send_expect("modprobe virtio_net", "# ", 20)
 
+        self.send_expect("insmod /usr/lib/modules/%s/kernel/drivers/net/ethernet/intel/i40e/i40e.ko"%'`uname -r`', "# ", 60)
+        out = self.send_expect("lsmod |grep i40e", "# ", 30)
+        if "i40e" not in out:
+           self.logger.error("please check the os install i40e driver already.");
         try:
             for (pci_bus, pci_id) in self.pci_devices_info:
                 """
@@ -173,6 +177,9 @@ class Crb(object):
                         self.send_expect("echo -n 0000:%s > /sys/bus/pci/drivers/e1000/bind" % pci_bus, "# ")
                 elif pci_id in ('1af4:1000'):
                     self.send_expect("echo 0000%s > /sys/bus/pci/drivers/virtio-pci/bind" % pci_bus, "# ")
+                elif pci_id in ('8086:1583','8086:1584','8086:1572'):
+                    if not os.path.exists("/sys/bus/pci/drivers/i40e/"+"0000:"+pci_bus):
+                        self.send_expect("echo 0000:%s > /sys/bus/pci/drivers/i40e/bind" % pci_bus, "# ")
                 else:
                     continue
 
diff --git a/framework/settings.py b/framework/settings.py
index 2ef8db8..40b81fb 100644
--- a/framework/settings.py
+++ b/framework/settings.py
@@ -55,6 +55,9 @@ NICS = {
     'I217LM': '8086:153a',
     'I218V': '8086:1559',
     'I218LM': '8086:155a',
+    'fortville_eagle': '8086:1572',
+    'fortville_spirit': '8086:1583',
+    'fortville_spirit_single': '8086:1584',
 }
 
 DRIVERS = {
@@ -80,6 +83,9 @@ DRIVERS = {
     'I217LM': 'igb',
     'I218V': 'igb',
     'I218LM': 'igb',
+    'fortville_eagle': 'i40e',
+    'fortville_spirit': 'i40e',
+    'fortville_spirit_single':'i40e'
 }
 
 """
diff --git a/framework/test_case.py b/framework/test_case.py
index 706003f..07fdc36 100644
--- a/framework/test_case.py
+++ b/framework/test_case.py
@@ -76,5 +76,9 @@ class TestCase(object):
             bitrate *= 10  # 10 Gb NICs
         elif self.nic == "avoton2c5":
             bitrate *= 2.5  # 2.5 Gb NICs
+        elif self.nic in ["fortville_spirit", "fortville_spirit_single"]:
+            bitrate *= 40
+        elif self.nic == 'fortville_eagle':
+		    bitrate *= 10
 
         return bitrate * num_ports / 8 / (frame_size + 20)
-- 
1.7.4.4

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

* Re: [dts] [PATCH] update framework for support fortville NIC test.
  2015-01-27  3:37 [dts] [PATCH] update framework for support fortville NIC test huilongx.xu
@ 2015-01-27  4:58 ` Liu, Yong
  2015-01-27  5:37   ` Xu, HuilongX
  2015-01-27  5:32 ` Qiu, Michael
  1 sibling, 1 reply; 4+ messages in thread
From: Liu, Yong @ 2015-01-27  4:58 UTC (permalink / raw)
  To: Xu, HuilongX, dts

Hi huilong,
Please see my comments in the mail.

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of huilongx.xu
> Sent: Tuesday, January 27, 2015 11:38 AM
> To: dts@dpdk.org
> Subject: [dts] [PATCH] update framework for support fortville NIC test.
> 
> execution_fortville.cfg is the test case list for fortville NIC
> 
> crb.py, add fortville NIC kernel driver(i40e) in dts
> 
> settings.py, add fortville NIC info in dts
> 
> testt_case.py, insmode and used i40e for fortvill NIC
> 
> Signed-off-by: huilongx.xu <huilongx.xu@intel.com>
> ---
>  execution_fortville.cfg |   21 +++++++++++++++++++++
>  framework/crb.py        |    7 +++++++
>  framework/settings.py   |    6 ++++++
>  framework/test_case.py  |    4 ++++
>  4 files changed, 38 insertions(+), 0 deletions(-)
>  create mode 100644 execution_fortville.cfg
> 
> diff --git a/execution_fortville.cfg b/execution_fortville.cfg
> new file mode 100644
> index 0000000..15f2ccf
> --- /dev/null
> +++ b/execution_fortville.cfg
> @@ -0,0 +1,21 @@
> +[Execution1]
> +crbs=<CRB IP Address>
> +drivername=<driver name igb_uio or vfio-pci>
> +test_suites=
> +    cmdline,
> +    hello_world,
> +    multiprocess,
> +    blacklist
> +targets=
> +    x86_64-native-linuxapp-gcc
> +parameters=nic_type=fortville_eagle:func=true
> +

This configuration file seems not enough for FVL.
Please add those suites which already supported FVL. 


> +[Execution2]
> +crbs=<Performance CRB IP Address>
> +drivername=<driver name igb_uio or vfio-pci>
> +test_suites=
> +    l2fwd,
> +    l3fwd
> +targets=
> +    x86_64-native-linuxapp-gcc
> +parameters=nic_type=fortville_eagle:perf=true
> diff --git a/framework/crb.py b/framework/crb.py
> index d41f51b..e2e8d92 100644
> --- a/framework/crb.py
> +++ b/framework/crb.py
> @@ -151,6 +151,10 @@ class Crb(object):
>          self.send_expect("modprobe e1000", "# ", 20)
>          self.send_expect("modprobe virtio_net", "# ", 20)
> 
> +        self.send_expect("insmod
> /usr/lib/modules/%s/kernel/drivers/net/ethernet/intel/i40e/i40e.ko"%'`unam
> e -r`', "# ", 60)
> +        out = self.send_expect("lsmod |grep i40e", "# ", 30)
> +        if "i40e" not in out:
> +           self.logger.error("please check the os install i40e driver
> already.");

We cannot sure everyone has Fortville validation environment. It's better to check when NIC is Fortville.
Or you can wait for a while, we will implement new function in replace of this function.

>          try:
>              for (pci_bus, pci_id) in self.pci_devices_info:
>                  """
> @@ -173,6 +177,9 @@ class Crb(object):
>                          self.send_expect("echo -n 0000:%s >
> /sys/bus/pci/drivers/e1000/bind" % pci_bus, "# ")
>                  elif pci_id in ('1af4:1000'):
>                      self.send_expect("echo 0000%s >
> /sys/bus/pci/drivers/virtio-pci/bind" % pci_bus, "# ")
> +                elif pci_id in ('8086:1583','8086:1584','8086:1572'):
> +                    if not
> os.path.exists("/sys/bus/pci/drivers/i40e/"+"0000:"+pci_bus):
> +                        self.send_expect("echo 0000:%s >
> /sys/bus/pci/drivers/i40e/bind" % pci_bus, "# ")
>                  else:
>                      continue
> 
> diff --git a/framework/settings.py b/framework/settings.py
> index 2ef8db8..40b81fb 100644
> --- a/framework/settings.py
> +++ b/framework/settings.py
> @@ -55,6 +55,9 @@ NICS = {
>      'I217LM': '8086:153a',
>      'I218V': '8086:1559',
>      'I218LM': '8086:155a',
> +    'fortville_eagle': '8086:1572',
> +    'fortville_spirit': '8086:1583',
> +    'fortville_spirit_single': '8086:1584',
>  }
> 
>  DRIVERS = {
> @@ -80,6 +83,9 @@ DRIVERS = {
>      'I217LM': 'igb',
>      'I218V': 'igb',
>      'I218LM': 'igb',
> +    'fortville_eagle': 'i40e',
> +    'fortville_spirit': 'i40e',
> +    'fortville_spirit_single':'i40e'
>  }
> 
>  """
> diff --git a/framework/test_case.py b/framework/test_case.py
> index 706003f..07fdc36 100644
> --- a/framework/test_case.py
> +++ b/framework/test_case.py
> @@ -76,5 +76,9 @@ class TestCase(object):
>              bitrate *= 10  # 10 Gb NICs
>          elif self.nic == "avoton2c5":
>              bitrate *= 2.5  # 2.5 Gb NICs
> +        elif self.nic in ["fortville_spirit", "fortville_spirit_single"]:
> +            bitrate *= 40
> +        elif self.nic == 'fortville_eagle':
> +		    bitrate *= 10
> 
>          return bitrate * num_ports / 8 / (frame_size + 20)
> --
> 1.7.4.4

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

* Re: [dts] [PATCH] update framework for support fortville NIC test.
  2015-01-27  3:37 [dts] [PATCH] update framework for support fortville NIC test huilongx.xu
  2015-01-27  4:58 ` Liu, Yong
@ 2015-01-27  5:32 ` Qiu, Michael
  1 sibling, 0 replies; 4+ messages in thread
From: Qiu, Michael @ 2015-01-27  5:32 UTC (permalink / raw)
  To: Xu, HuilongX, dts

On 1/27/2015 11:38 AM, huilongx.xu wrote:
> execution_fortville.cfg is the test case list for fortville NIC
>
> crb.py, add fortville NIC kernel driver(i40e) in dts
>
> settings.py, add fortville NIC info in dts
>
> testt_case.py, insmode and used i40e for fortvill NIC
>
> Signed-off-by: huilongx.xu <huilongx.xu@intel.com>
> ---
>  execution_fortville.cfg |   21 +++++++++++++++++++++
>  framework/crb.py        |    7 +++++++
>  framework/settings.py   |    6 ++++++
>  framework/test_case.py  |    4 ++++
>  4 files changed, 38 insertions(+), 0 deletions(-)
>  create mode 100644 execution_fortville.cfg
>
> diff --git a/execution_fortville.cfg b/execution_fortville.cfg
> new file mode 100644
> index 0000000..15f2ccf
> --- /dev/null
> +++ b/execution_fortville.cfg
> @@ -0,0 +1,21 @@
> +[Execution1]
> +crbs=<CRB IP Address>
> +drivername=<driver name igb_uio or vfio-pci>
> +test_suites=
> +    cmdline,
> +    hello_world,
> +    multiprocess,
> +    blacklist
> +targets=
> +    x86_64-native-linuxapp-gcc
> +parameters=nic_type=fortville_eagle:func=true
> +
> +[Execution2]
> +crbs=<Performance CRB IP Address>
> +drivername=<driver name igb_uio or vfio-pci>
> +test_suites=
> +    l2fwd,
> +    l3fwd
> +targets=
> +    x86_64-native-linuxapp-gcc
> +parameters=nic_type=fortville_eagle:perf=true
> diff --git a/framework/crb.py b/framework/crb.py
> index d41f51b..e2e8d92 100644
> --- a/framework/crb.py
> +++ b/framework/crb.py
> @@ -151,6 +151,10 @@ class Crb(object):
>          self.send_expect("modprobe e1000", "# ", 20)
>          self.send_expect("modprobe virtio_net", "# ", 20)
>  
> +        self.send_expect("insmod /usr/lib/modules/%s/kernel/drivers/net/ethernet/intel/i40e/i40e.ko"%'`uname -r`', "# ", 60)

Here as it has in lib/modules, you can simply use:

self.send_expect("modprobe i40e", "# ",60)

> +        out = self.send_expect("lsmod |grep i40e", "# ", 30)
> +        if "i40e" not in out:
> +           self.logger.error("please check the os install i40e driver already.");
>          try:
>              for (pci_bus, pci_id) in self.pci_devices_info:

Here I have a patch to add one status ret value for command exec, so
Marvin will merge that.

And with that patch, here can simply like:

out = self.send_expect("modprobe i40e", "# ", 60, True)
if out == -1:
	self.logger.error("please verify the kernel has i40e driver installed");


>                  """
> @@ -173,6 +177,9 @@ class Crb(object):
>                          self.send_expect("echo -n 0000:%s > /sys/bus/pci/drivers/e1000/bind" % pci_bus, "# ")
>                  elif pci_id in ('1af4:1000'):
>                      self.send_expect("echo 0000%s > /sys/bus/pci/drivers/virtio-pci/bind" % pci_bus, "# ")
> +                elif pci_id in ('8086:1583','8086:1584','8086:1572'):
> +                    if not os.path.exists("/sys/bus/pci/drivers/i40e/"+"0000:"+pci_bus):

Here what are you doing?

As I know, os.path.exists() runs in locally, but you try to exec a command in remote after check, am I right?


> +                        self.send_expect("echo 0000:%s > /sys/bus/pci/drivers/i40e/bind" % pci_bus, "# ")
>                  else:
>                      continue
>  
> diff --git a/framework/settings.py b/framework/settings.py
> index 2ef8db8..40b81fb 100644
> --- a/framework/settings.py
> +++ b/framework/settings.py
> @@ -55,6 +55,9 @@ NICS = {
>      'I217LM': '8086:153a',
>      'I218V': '8086:1559',
>      'I218LM': '8086:155a',
> +    'fortville_eagle': '8086:1572',
> +    'fortville_spirit': '8086:1583',
> +    'fortville_spirit_single': '8086:1584',
>  }
>  
>  DRIVERS = {
> @@ -80,6 +83,9 @@ DRIVERS = {
>      'I217LM': 'igb',
>      'I218V': 'igb',
>      'I218LM': 'igb',
> +    'fortville_eagle': 'i40e',
> +    'fortville_spirit': 'i40e',
> +    'fortville_spirit_single':'i40e'
>  }
>  
>  """
> diff --git a/framework/test_case.py b/framework/test_case.py
> index 706003f..07fdc36 100644
> --- a/framework/test_case.py
> +++ b/framework/test_case.py
> @@ -76,5 +76,9 @@ class TestCase(object):
>              bitrate *= 10  # 10 Gb NICs
>          elif self.nic == "avoton2c5":
>              bitrate *= 2.5  # 2.5 Gb NICs
> +        elif self.nic in ["fortville_spirit", "fortville_spirit_single"]:
> +            bitrate *= 40
> +        elif self.nic == 'fortville_eagle':
> +		    bitrate *= 10
>  
>          return bitrate * num_ports / 8 / (frame_size + 20)


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

* Re: [dts] [PATCH] update framework for support fortville NIC test.
  2015-01-27  4:58 ` Liu, Yong
@ 2015-01-27  5:37   ` Xu, HuilongX
  0 siblings, 0 replies; 4+ messages in thread
From: Xu, HuilongX @ 2015-01-27  5:37 UTC (permalink / raw)
  To: Liu, Yong, dts

Hi yong,
The first comments, add all FVL suites in the config file:
     The other suites need update code for support FVL test, I will  send a new patch for update code.
The second comments, check the test NIC is FVL.
     I will update the code in v2 patch.

-----Original Message-----
From: Liu, Yong 
Sent: Tuesday, January 27, 2015 12:58 PM
To: Xu, HuilongX; dts@dpdk.org
Subject: RE: [dts] [PATCH] update framework for support fortville NIC test.

Hi huilong,
Please see my comments in the mail.

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of huilongx.xu
> Sent: Tuesday, January 27, 2015 11:38 AM
> To: dts@dpdk.org
> Subject: [dts] [PATCH] update framework for support fortville NIC test.
> 
> execution_fortville.cfg is the test case list for fortville NIC
> 
> crb.py, add fortville NIC kernel driver(i40e) in dts
> 
> settings.py, add fortville NIC info in dts
> 
> testt_case.py, insmode and used i40e for fortvill NIC
> 
> Signed-off-by: huilongx.xu <huilongx.xu@intel.com>
> ---
>  execution_fortville.cfg |   21 +++++++++++++++++++++
>  framework/crb.py        |    7 +++++++
>  framework/settings.py   |    6 ++++++
>  framework/test_case.py  |    4 ++++
>  4 files changed, 38 insertions(+), 0 deletions(-)
>  create mode 100644 execution_fortville.cfg
> 
> diff --git a/execution_fortville.cfg b/execution_fortville.cfg
> new file mode 100644
> index 0000000..15f2ccf
> --- /dev/null
> +++ b/execution_fortville.cfg
> @@ -0,0 +1,21 @@
> +[Execution1]
> +crbs=<CRB IP Address>
> +drivername=<driver name igb_uio or vfio-pci>
> +test_suites=
> +    cmdline,
> +    hello_world,
> +    multiprocess,
> +    blacklist
> +targets=
> +    x86_64-native-linuxapp-gcc
> +parameters=nic_type=fortville_eagle:func=true
> +

This configuration file seems not enough for FVL.
Please add those suites which already supported FVL. 


> +[Execution2]
> +crbs=<Performance CRB IP Address>
> +drivername=<driver name igb_uio or vfio-pci>
> +test_suites=
> +    l2fwd,
> +    l3fwd
> +targets=
> +    x86_64-native-linuxapp-gcc
> +parameters=nic_type=fortville_eagle:perf=true
> diff --git a/framework/crb.py b/framework/crb.py
> index d41f51b..e2e8d92 100644
> --- a/framework/crb.py
> +++ b/framework/crb.py
> @@ -151,6 +151,10 @@ class Crb(object):
>          self.send_expect("modprobe e1000", "# ", 20)
>          self.send_expect("modprobe virtio_net", "# ", 20)
> 
> +        self.send_expect("insmod
> /usr/lib/modules/%s/kernel/drivers/net/ethernet/intel/i40e/i40e.ko"%'`unam
> e -r`', "# ", 60)
> +        out = self.send_expect("lsmod |grep i40e", "# ", 30)
> +        if "i40e" not in out:
> +           self.logger.error("please check the os install i40e driver
> already.");

We cannot sure everyone has Fortville validation environment. It's better to check when NIC is Fortville.
Or you can wait for a while, we will implement new function in replace of this function.

>          try:
>              for (pci_bus, pci_id) in self.pci_devices_info:
>                  """
> @@ -173,6 +177,9 @@ class Crb(object):
>                          self.send_expect("echo -n 0000:%s >
> /sys/bus/pci/drivers/e1000/bind" % pci_bus, "# ")
>                  elif pci_id in ('1af4:1000'):
>                      self.send_expect("echo 0000%s >
> /sys/bus/pci/drivers/virtio-pci/bind" % pci_bus, "# ")
> +                elif pci_id in ('8086:1583','8086:1584','8086:1572'):
> +                    if not
> os.path.exists("/sys/bus/pci/drivers/i40e/"+"0000:"+pci_bus):
> +                        self.send_expect("echo 0000:%s >
> /sys/bus/pci/drivers/i40e/bind" % pci_bus, "# ")
>                  else:
>                      continue
> 
> diff --git a/framework/settings.py b/framework/settings.py
> index 2ef8db8..40b81fb 100644
> --- a/framework/settings.py
> +++ b/framework/settings.py
> @@ -55,6 +55,9 @@ NICS = {
>      'I217LM': '8086:153a',
>      'I218V': '8086:1559',
>      'I218LM': '8086:155a',
> +    'fortville_eagle': '8086:1572',
> +    'fortville_spirit': '8086:1583',
> +    'fortville_spirit_single': '8086:1584',
>  }
> 
>  DRIVERS = {
> @@ -80,6 +83,9 @@ DRIVERS = {
>      'I217LM': 'igb',
>      'I218V': 'igb',
>      'I218LM': 'igb',
> +    'fortville_eagle': 'i40e',
> +    'fortville_spirit': 'i40e',
> +    'fortville_spirit_single':'i40e'
>  }
> 
>  """
> diff --git a/framework/test_case.py b/framework/test_case.py
> index 706003f..07fdc36 100644
> --- a/framework/test_case.py
> +++ b/framework/test_case.py
> @@ -76,5 +76,9 @@ class TestCase(object):
>              bitrate *= 10  # 10 Gb NICs
>          elif self.nic == "avoton2c5":
>              bitrate *= 2.5  # 2.5 Gb NICs
> +        elif self.nic in ["fortville_spirit", "fortville_spirit_single"]:
> +            bitrate *= 40
> +        elif self.nic == 'fortville_eagle':
> +		    bitrate *= 10
> 
>          return bitrate * num_ports / 8 / (frame_size + 20)
> --
> 1.7.4.4

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

end of thread, other threads:[~2015-01-27  5:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-27  3:37 [dts] [PATCH] update framework for support fortville NIC test huilongx.xu
2015-01-27  4:58 ` Liu, Yong
2015-01-27  5:37   ` Xu, HuilongX
2015-01-27  5:32 ` Qiu, Michael

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