test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1 0/3] replace i40evf with iavf in framework
@ 2020-12-11  7:08 Haiyang Zhao
  2020-12-11  7:08 ` [dts] [PATCH V1 1/3] framework/dut: add an attribute nic in dut Haiyang Zhao
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Haiyang Zhao @ 2020-12-11  7:08 UTC (permalink / raw)
  To: dts, lijuan.tu; +Cc: Haiyang Zhao

Now we need to replace i40evf with iavf for the 
nics whose kernel driver is i40e, and there are 
about 20 suites need to do this.

Do this replacement in suites is duplicated
and will cost lot of time when recompiling DPDK, so we do 
it in framework.

Delete the replacement code in kernelpf_iavf as it has been
done in framework.

Haiyang Zhao (3):
  framework/dut: add an attribute nic in dut get the instance of
    NetDevice from the port_info, and save it in dut as attribute nic.
  framework/project_dpdk: replace i40evf with iavf
  tests/kernelpf_iavf: delete code of replacing i40evf replace i40evf
    with iavf is completed in framework, so delete the code of replacing
    i40evf.

 framework/dut.py                 |  3 +++
 framework/project_dpdk.py        | 11 +++++++++++
 tests/TestSuite_kernelpf_iavf.py | 12 ------------
 3 files changed, 14 insertions(+), 12 deletions(-)

-- 
2.17.1


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

* [dts] [PATCH V1 1/3] framework/dut: add an attribute nic in dut
  2020-12-11  7:08 [dts] [PATCH V1 0/3] replace i40evf with iavf in framework Haiyang Zhao
@ 2020-12-11  7:08 ` Haiyang Zhao
  2020-12-11  7:08 ` [dts] [PATCH V1 2/3] framework/project_dpdk: replace i40evf with iavf Haiyang Zhao
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Haiyang Zhao @ 2020-12-11  7:08 UTC (permalink / raw)
  To: dts, lijuan.tu; +Cc: Haiyang Zhao

 get the instance of NetDevice from the port_info, 
 and save it in dut as attribute nic.

Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
 framework/dut.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/framework/dut.py b/framework/dut.py
index dcf833b4..388fec04 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -81,6 +81,7 @@ class Dut(Crb):
         self.apps_name_conf = {}
         self.apps_name = {}
         self.dpdk_version = ''
+        self.nic = None
 
     def filter_cores_from_crb_cfg(self):
         # get core list from crbs.cfg
@@ -405,6 +406,8 @@ class Dut(Crb):
         # print latest ports_info
         for port_info in self.ports_info:
             self.logger.info(port_info)
+            if self.nic is None:
+                self.nic = port_info['port']
         if self.ports_map is None or len(self.ports_map) == 0:
             self.logger.warning("ports_map should not be empty, please check all links")
 
-- 
2.17.1


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

* [dts] [PATCH V1 2/3] framework/project_dpdk: replace i40evf with iavf
  2020-12-11  7:08 [dts] [PATCH V1 0/3] replace i40evf with iavf in framework Haiyang Zhao
  2020-12-11  7:08 ` [dts] [PATCH V1 1/3] framework/dut: add an attribute nic in dut Haiyang Zhao
@ 2020-12-11  7:08 ` Haiyang Zhao
  2020-12-11  7:08 ` [dts] [PATCH V1 3/3] tests/kernelpf_iavf: delete code of replacing i40evf Haiyang Zhao
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Haiyang Zhao @ 2020-12-11  7:08 UTC (permalink / raw)
  To: dts, lijuan.tu; +Cc: Haiyang Zhao

replace i40evf with iavf in both host and vm dut,
if the nic kernel driver is i40e.

Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
 framework/project_dpdk.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
index 259282f4..a8a128ac 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -278,6 +278,17 @@ class DPDKdut(Dut):
         shared_lib_path = load_global_setting(HOST_SHARED_LIB_PATH)
         if use_shared_lib == 'true' and 'Virt' not in str(self):
             self.set_build_options({'RTE_BUILD_SHARED_LIB': 'y'})
+        kernel_driver = ''
+        if 'Virt' in str(self):
+            if self.host_dut.nic:
+                kernel_driver = self.host_dut.nic.default_driver
+        elif self.nic:
+            kernel_driver = self.nic.default_driver
+
+        if kernel_driver == 'i40e':
+            self.send_expect("sed -i '/{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_ADAPTIVE_VF) },/a { RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF) },' drivers/net/iavf/iavf_ethdev.c", "# ")
+            self.send_expect("sed -i -e '/I40E_DEV_ID_VF/s/0x154C/0x164C/g'  drivers/net/i40e/base/i40e_devids.h", "# ")
+
         build_type = load_global_setting(HOST_BUILD_TYPE_SETTING)
         build_install_dpdk = getattr(self, 'build_install_dpdk_%s_%s' % (self.get_os_type(), build_type))
         build_install_dpdk(target, extra_options)
-- 
2.17.1


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

* [dts] [PATCH V1 3/3] tests/kernelpf_iavf: delete code of replacing i40evf
  2020-12-11  7:08 [dts] [PATCH V1 0/3] replace i40evf with iavf in framework Haiyang Zhao
  2020-12-11  7:08 ` [dts] [PATCH V1 1/3] framework/dut: add an attribute nic in dut Haiyang Zhao
  2020-12-11  7:08 ` [dts] [PATCH V1 2/3] framework/project_dpdk: replace i40evf with iavf Haiyang Zhao
@ 2020-12-11  7:08 ` Haiyang Zhao
  2020-12-11  7:21 ` [dts] [PATCH V1 0/3] replace i40evf with iavf in framework Zhao, HaiyangX
  2020-12-11  7:25 ` Tu, Lijuan
  4 siblings, 0 replies; 7+ messages in thread
From: Haiyang Zhao @ 2020-12-11  7:08 UTC (permalink / raw)
  To: dts, lijuan.tu; +Cc: Haiyang Zhao

 replace i40evf with iavf is completed in framework, so delete the code of
 replacing i40evf.

Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
 tests/TestSuite_kernelpf_iavf.py | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py
index da925109..0420cfa1 100644
--- a/tests/TestSuite_kernelpf_iavf.py
+++ b/tests/TestSuite_kernelpf_iavf.py
@@ -174,21 +174,9 @@ class TestKernelpfIavf(TestCase):
         except Exception as e:
             self.destroy_vm_env()
             raise Exception(e)
-        netdev = self.dut.ports_info[0]['port']
-        nic_drive = netdev.get_nic_driver()
-        if nic_drive == "i40e":
-            self.vm_dut.send_expect("sed -i '/{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_ADAPTIVE_VF) },/a { RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF) },' drivers/net/iavf/iavf_ethdev.c", "# ")
-            self.vm_dut.send_expect("sed -i -e '/I40E_DEV_ID_VF/s/0x154C/0x164C/g'  drivers/net/i40e/base/i40e_devids.h", "# ")
-            self.vm_dut.build_install_dpdk(self.target)
         self.env_done = True
 
     def destroy_vm_env(self):
-        netdev = self.dut.ports_info[0]['port']
-        nic_drive = netdev.get_nic_driver()
-        if nic_drive == "i40e":
-            self.vm_dut.send_expect("sed -i '/{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF) },/d' drivers/net/iavf/iavf_ethdev.c", "# ")
-            self.vm_dut.send_expect("sed -i -e '/I40E_DEV_ID_VF/s/0x164C/0x154C/g' drivers/net/i40e/base/i40e_devids.h", "# ")
-            self.vm_dut.build_install_dpdk(self.target)
         if getattr(self, 'vm', None):
             if getattr(self, 'vm_dut', None):
                 self.vm_dut.kill_all()
-- 
2.17.1


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

* Re: [dts] [PATCH V1 0/3] replace i40evf with iavf in framework
  2020-12-11  7:08 [dts] [PATCH V1 0/3] replace i40evf with iavf in framework Haiyang Zhao
                   ` (2 preceding siblings ...)
  2020-12-11  7:08 ` [dts] [PATCH V1 3/3] tests/kernelpf_iavf: delete code of replacing i40evf Haiyang Zhao
@ 2020-12-11  7:21 ` Zhao, HaiyangX
  2020-12-11  7:25 ` Tu, Lijuan
  4 siblings, 0 replies; 7+ messages in thread
From: Zhao, HaiyangX @ 2020-12-11  7:21 UTC (permalink / raw)
  To: dts, Tu, Lijuan

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]

Tested-by: Haiyang Zhao <haiyangx.zhao@intel.com>

Best Regards,
Zhao Haiyang

> -----Original Message-----
> From: Haiyang Zhao <haiyangx.zhao@intel.com>
> Sent: Friday, December 11, 2020 15:08
> To: dts@dpdk.org; Tu, Lijuan <lijuan.tu@intel.com>
> Cc: Zhao, HaiyangX <haiyangx.zhao@intel.com>
> Subject: [dts][PATCH V1 0/3] replace i40evf with iavf in framework


[-- Attachment #2: TestKernelpfIavf.log --]
[-- Type: application/octet-stream, Size: 268412 bytes --]

[-- Attachment #3: TestVfRss.log --]
[-- Type: application/octet-stream, Size: 1174624 bytes --]

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

* Re: [dts] [PATCH V1 0/3] replace i40evf with iavf in framework
  2020-12-11  7:08 [dts] [PATCH V1 0/3] replace i40evf with iavf in framework Haiyang Zhao
                   ` (3 preceding siblings ...)
  2020-12-11  7:21 ` [dts] [PATCH V1 0/3] replace i40evf with iavf in framework Zhao, HaiyangX
@ 2020-12-11  7:25 ` Tu, Lijuan
  2020-12-15  2:11   ` Tu, Lijuan
  4 siblings, 1 reply; 7+ messages in thread
From: Tu, Lijuan @ 2020-12-11  7:25 UTC (permalink / raw)
  To: Zhao, HaiyangX, dts; +Cc: Zhao, HaiyangX

> Now we need to replace i40evf with iavf for the nics whose kernel driver is
> i40e, and there are about 20 suites need to do this.
> 
> Do this replacement in suites is duplicated and will cost lot of time when
> recompiling DPDK, so we do it in framework.
> 
> Delete the replacement code in kernelpf_iavf as it has been done in
> framework.
> 
> Haiyang Zhao (3):
>   framework/dut: add an attribute nic in dut get the instance of
>     NetDevice from the port_info, and save it in dut as attribute nic.
>   framework/project_dpdk: replace i40evf with iavf
>   tests/kernelpf_iavf: delete code of replacing i40evf replace i40evf
>     with iavf is completed in framework, so delete the code of replacing
>     i40evf.


Please consider clean up related code as next job, such us test plan, test suites, thanks

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

* Re: [dts] [PATCH V1 0/3] replace i40evf with iavf in framework
  2020-12-11  7:25 ` Tu, Lijuan
@ 2020-12-15  2:11   ` Tu, Lijuan
  0 siblings, 0 replies; 7+ messages in thread
From: Tu, Lijuan @ 2020-12-15  2:11 UTC (permalink / raw)
  To: Tu, Lijuan, Zhao, HaiyangX, dts; +Cc: Zhao, HaiyangX



> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Tu, Lijuan
> Sent: 2020年12月11日 15:25
> To: Zhao, HaiyangX <haiyangx.zhao@intel.com>; dts@dpdk.org
> Cc: Zhao, HaiyangX <haiyangx.zhao@intel.com>
> Subject: Re: [dts] [PATCH V1 0/3] replace i40evf with iavf in framework
> 
> > Now we need to replace i40evf with iavf for the nics whose kernel
> > driver is i40e, and there are about 20 suites need to do this.
> >
> > Do this replacement in suites is duplicated and will cost lot of time
> > when recompiling DPDK, so we do it in framework.
> >
> > Delete the replacement code in kernelpf_iavf as it has been done in
> > framework.
> >
> > Haiyang Zhao (3):
> >   framework/dut: add an attribute nic in dut get the instance of
> >     NetDevice from the port_info, and save it in dut as attribute nic.
> >   framework/project_dpdk: replace i40evf with iavf
> >   tests/kernelpf_iavf: delete code of replacing i40evf replace i40evf
> >     with iavf is completed in framework, so delete the code of replacing
> >     i40evf.
> 
> 
> Please consider clean up related code as next job, such us test plan, test
> suites, thanks

Applied

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

end of thread, other threads:[~2020-12-15  2:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-11  7:08 [dts] [PATCH V1 0/3] replace i40evf with iavf in framework Haiyang Zhao
2020-12-11  7:08 ` [dts] [PATCH V1 1/3] framework/dut: add an attribute nic in dut Haiyang Zhao
2020-12-11  7:08 ` [dts] [PATCH V1 2/3] framework/project_dpdk: replace i40evf with iavf Haiyang Zhao
2020-12-11  7:08 ` [dts] [PATCH V1 3/3] tests/kernelpf_iavf: delete code of replacing i40evf Haiyang Zhao
2020-12-11  7:21 ` [dts] [PATCH V1 0/3] replace i40evf with iavf in framework Zhao, HaiyangX
2020-12-11  7:25 ` Tu, Lijuan
2020-12-15  2:11   ` Tu, Lijuan

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