test suite reviews and discussions
 help / color / mirror / Atom feed
From: Dukai Yuan <dukaix.yuan@intel.com>
To: dts@dpdk.org
Cc: Dukai Yuan <dukaix.yuan@intel.com>
Subject: [dts][PATCH V1] tests/dpdk_gso_lib: optimize code to get NIC driver name
Date: Fri, 30 Dec 2022 18:06:21 +0800	[thread overview]
Message-ID: <20221230100621.13807-1-dukaix.yuan@intel.com> (raw)

The NIC driver name obtained by the original code is inaccurate.
So optimize code to get NIC driver name.

Signed-off-by: Dukai Yuan <dukaix.yuan@intel.com>
---
 tests/TestSuite_dpdk_gso_lib.py | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/tests/TestSuite_dpdk_gso_lib.py b/tests/TestSuite_dpdk_gso_lib.py
index c989bfc8..0d00e37c 100644
--- a/tests/TestSuite_dpdk_gso_lib.py
+++ b/tests/TestSuite_dpdk_gso_lib.py
@@ -21,19 +21,6 @@ from framework.virt_common import VM
 
 class TestDPDKGsoLib(TestCase):
     def set_up_all(self):
-        # This suite will not use the port config in ports.cfg
-        # it will use the port config in vhost_gro.cfg
-        # And it need two interface reconnet in DUT
-
-        # unbind the port which config in ports.cfg
-        self.dut_ports = self.dut.get_ports()
-        self.def_driver = self.dut.ports_info[self.dut_ports[0]][
-            "port"
-        ].get_nic_driver()
-        for i in self.dut_ports:
-            port = self.dut.ports_info[i]["port"]
-            port.bind_driver()
-
         # get and bind the port in conf file
         self.pci = peer.get_pci_info()
         self.pci_drv = peer.get_pci_driver_info()
@@ -48,7 +35,7 @@ class TestDPDKGsoLib(TestCase):
         )
         bind_script_path = self.dut.get_dpdk_bind_script()
         self.dut.send_expect(
-            "%s --bind=%s %s" % (bind_script_path, self.def_driver, self.pci), "# "
+            "%s --bind=%s %s" % (bind_script_path, self.drivername, self.pci), "# "
         )
         self.path = self.dut.apps_name["test-pmd"]
         self.testpmd_name = self.path.split("/")[-1]
@@ -491,9 +478,6 @@ class TestDPDKGsoLib(TestCase):
         """
         Run after each test suite.
         """
-        for i in self.dut_ports:
-            port = self.dut.ports_info[i]["port"]
-            port.bind_driver(self.def_driver)
         self.dut.send_expect("ip netns del ns1", "#", 30)
         self.dut.send_expect("./usertools/dpdk-devbind.py -u %s" % (self.pci), "# ", 30)
         self.dut.send_expect(
-- 
2.17.1


                 reply	other threads:[~2022-12-30 10:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221230100621.13807-1-dukaix.yuan@intel.com \
    --to=dukaix.yuan@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).