test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1]interrupt_pmd: only vfio-pci support interrupt and reduce run time
@ 2020-04-17  3:43 Xiao Qimai
  2020-04-20  5:23 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Xiao Qimai @ 2020-04-17  3:43 UTC (permalink / raw)
  To: dts; +Cc: Xiao Qimai

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


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

* Re: [dts] [PATCH V1]interrupt_pmd: only vfio-pci support interrupt and reduce run time
  2020-04-17  3:43 [dts] [PATCH V1]interrupt_pmd: only vfio-pci support interrupt and reduce run time Xiao Qimai
@ 2020-04-20  5:23 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2020-04-20  5:23 UTC (permalink / raw)
  To: Xiao, QimaiX, dts; +Cc: Xiao, QimaiX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai
> Sent: Friday, April 17, 2020 11:43 AM
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts] [PATCH V1]interrupt_pmd: only vfio-pci support interrupt and
> reduce run time
> 
> *. 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


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

end of thread, other threads:[~2020-04-20  5:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17  3:43 [dts] [PATCH V1]interrupt_pmd: only vfio-pci support interrupt and reduce run time Xiao Qimai
2020-04-20  5:23 ` 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).