From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8D23FA0588; Fri, 17 Apr 2020 05:49:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5413A1DD57; Fri, 17 Apr 2020 05:49:45 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 03BE11DD54 for ; Fri, 17 Apr 2020 05:49:43 +0200 (CEST) IronPort-SDR: 7D+eEXMYAoD+OjVpWdH/uE634TCRzR3TeYQ/N+hMo8npfcnMsOmJ6JwAhzLVtqe/5OgX8Y1VNV tcRuEe7pNKww== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2020 20:49:42 -0700 IronPort-SDR: psVRobDDXxYulVa+sDfJ7F/EfYnUKj5B05udpLxEGSJRYYuUH/T+sReeVDltxGu4POhQCuAsF3 rNKjXFPvkFWw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,393,1580803200"; d="scan'208";a="272293126" Received: from unknown (HELO dpdk-xiaoqimai-dut.sh.intel.com) ([10.240.183.52]) by orsmga002.jf.intel.com with ESMTP; 16 Apr 2020 20:49:41 -0700 From: Xiao Qimai To: dts@dpdk.org Cc: Xiao Qimai Date: Fri, 17 Apr 2020 11:43:15 +0800 Message-Id: <1587094995-281098-1-git-send-email-qimaix.xiao@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V1]interrupt_pmd: only vfio-pci support interrupt and reduce run time X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" *. dpdk not support interrupt mode with igb_uio Signed-off-by: Xiao Qimai --- 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