diff mbox series

[V1] tests/kernelpf_iavf: adjust the order of getting NIC driver version

Message ID 20210118073559.23995-1-weix.xie@intel.com (mailing list archive)
State Accepted
Headers show
Series [V1] tests/kernelpf_iavf: adjust the order of getting NIC driver version | expand

Commit Message

Xie, WeiX Jan. 18, 2021, 7:35 a.m. UTC
In set_up_all func, the device can't be used which is bound to vfio-pci.
So adjust the order of getting nic driver version.

Signed-off-by: Xie wei <weix.xie@intel.com>
---
 tests/TestSuite_kernelpf_iavf.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Xie, WeiX Jan. 18, 2021, 7:36 a.m. UTC | #1
Tested-by:  Xie,WeiX < weix.xie@intel.com>

Regards,
Xie Wei


> -----Original Message-----
> From: Xie wei [mailto:weix.xie@intel.com]
> Sent: Monday, January 18, 2021 3:36 PM
> To: dts@dpdk.org
> Cc: Xie, WeiX <weix.xie@intel.com>
> Subject: [PATCH V1] tests/kernelpf_iavf: adjust the order of getting NIC
> driver version
Zhao, HaiyangX Jan. 19, 2021, 9:02 a.m. UTC | #2
Acked-by: Haiyang Zhao <haiyangx.zhao@intel.com>

Best Regards,
Zhao Haiyang

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Xie, WeiX
> Sent: Monday, January 18, 2021 15:36
> To: dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] tests/kernelpf_iavf: adjust the order of getting
> NIC driver version
> 
> Tested-by:  Xie,WeiX < weix.xie@intel.com>
> 
> Regards,
> Xie Wei
> 
> 
> > -----Original Message-----
> > From: Xie wei [mailto:weix.xie@intel.com]
> > Sent: Monday, January 18, 2021 3:36 PM
> > To: dts@dpdk.org
> > Cc: Xie, WeiX <weix.xie@intel.com>
> > Subject: [PATCH V1] tests/kernelpf_iavf: adjust the order of getting
> > NIC driver version
Tu, Lijuan Jan. 21, 2021, 8:03 a.m. UTC | #3
> In set_up_all func, the device can't be used which is bound to vfio-pci.
> So adjust the order of getting nic driver version.
> 
> Signed-off-by: Xie wei <weix.xie@intel.com>

Applied
diff mbox series

Patch

diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py
index 68f16096..2fed9b7f 100644
--- a/tests/TestSuite_kernelpf_iavf.py
+++ b/tests/TestSuite_kernelpf_iavf.py
@@ -94,10 +94,6 @@  class TestKernelpfIavf(TestCase):
         self.tester_intf1 = self.tester.get_interface(tester_port1)
         self.l3fwdpower_name = self.dut.apps_name['l3fwd-power'].strip().split('/')[-1]
 
-        # get driver version
-        out = self.dut.send_expect("ethtool -i %s | awk -F':' 'NR==2{print $2}'" % self.host_intf, "# ")
-        self.driver_version = out.replace(" ", "")
-
     def set_up(self):
 
         if self.running_case == "test_vf_mac_filter":
@@ -159,6 +155,10 @@  class TestKernelpfIavf(TestCase):
             self.dut.send_expect("ip link set %s vf 0 mac %s" %
                                  (self.host_intf, self.vf_mac), "# ")
 
+        # get driver version
+        out = self.dut.send_expect("ethtool -i %s | awk -F':' 'NR==2{print $2}'" % self.host_intf, "# ")
+        self.driver_version = out.replace(" ", "")
+
         try:
 
             for port in self.sriov_vfs_port: