test suite reviews and discussions
 help / color / mirror / Atom feed
From: Xiao Qimai <qimaix.xiao@intel.com>
To: dts@dpdk.org
Cc: Xiao Qimai <qimaix.xiao@intel.com>
Subject: [dts] [PATCH V1]interrupt_pmd: only vfio-pci support interrupt and reduce run time
Date: Fri, 17 Apr 2020 11:43:15 +0800	[thread overview]
Message-ID: <1587094995-281098-1-git-send-email-qimaix.xiao@intel.com> (raw)

*. dpdk not support interrupt mode with igb_uio

Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
 tests/TestSuite_interrupt_pmd.py | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_interrupt_pmd.py b/tests/TestSuite_interrupt_pmd.py
index a0467bd..17a58af 100644
--- a/tests/TestSuite_interrupt_pmd.py
+++ b/tests/TestSuite_interrupt_pmd.py
@@ -64,6 +64,22 @@ class TestInterruptPmd(TestCase):
         out = self.dut.build_dpdk_apps("./examples/l3fwd-power")
         self.verify("Error" not in out, "compilation error 1")
         self.verify("No such file" not in out, "compilation error 2")
+        self.default_driver = self.get_nic_driver()
+        test_driver = "vfio-pci"
+        if test_driver != self.default_driver:
+            self.dut.send_expect("modprobe %s" % test_driver, "#")
+        self.set_nic_driver(test_driver)
+
+    def get_nic_driver(self, port_id=0):
+        port = self.dut.ports_info[port_id]["port"]
+        return port.get_nic_driver()
+
+    def set_nic_driver(self, set_driver='vfio-pci'):
+        for i in self.dut_ports:
+            port = self.dut.ports_info[i]["port"]
+            driver = port.get_nic_driver()
+            if driver != set_driver:
+                port.bind_driver(driver=set_driver)
 
     def set_up(self):
         """
@@ -113,7 +129,7 @@ class TestInterruptPmd(TestCase):
                 txItf = self.tester.get_interface(txport)
                 self.tester.scapy_append(
                     'sendp([Ether()/IP(dst="198.0.0.%d")/UDP()/Raw(\'X\'*18)], iface="%s")' % (j, txItf))
-                self.tester.scapy_execute()
+        self.tester.scapy_execute()
 
     def tear_down(self):
         """
@@ -126,3 +142,4 @@ class TestInterruptPmd(TestCase):
         Run after each test suite.
         """
         self.dut.kill_all()
+        self.set_nic_driver(self.default_driver)
-- 
1.8.3.1


             reply	other threads:[~2020-04-17  3:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17  3:43 Xiao Qimai [this message]
2020-04-20  5:23 ` Tu, Lijuan

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=1587094995-281098-1-git-send-email-qimaix.xiao@intel.com \
    --to=qimaix.xiao@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).