dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools/dpdk_nic_bind: Fix can't bind virtio-pci issue
@ 2015-02-26  4:57 Ouyang Changchun
       [not found] ` <1424926669-14202-1-git-send-email-changchun.ouyang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Ouyang Changchun @ 2015-02-26  4:57 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

In virtio test, on guest
1. Bind virtio port to igb_uio driver;
2. Remove igb_uio module;
3. Bind virtio port to virtio-pci driver, it fails and reports:
   "Error - no supported modules are loaded"

The tool should check the to-be-bound driver flag, if it is dpdk driver(igb_uio, vfio etc),
and the corresponding module is not loaded, then exit, otherwise, just report a warning,
and continue to bind the non-dpdk driver(like virtio-pci) to dev.

Signed-off-by: Changchun Ouyang <changchun.ouyang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 tools/dpdk_nic_bind.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/dpdk_nic_bind.py b/tools/dpdk_nic_bind.py
index 2483056..8523f82 100755
--- a/tools/dpdk_nic_bind.py
+++ b/tools/dpdk_nic_bind.py
@@ -175,8 +175,11 @@ def check_modules():
 
     # check if we have at least one loaded module
     if True not in [mod["Found"] for mod in mods] and b_flag is not None:
-        print "Error - no supported modules are loaded"
-        sys.exit(1)
+        if b_flag in dpdk_drivers:
+            print "Error - no supported modules(DPDK driver) are loaded"
+            sys.exit(1)
+        else:
+            print "Warning - no supported modules(DPDK driver) are loaded"
 
     # change DPDK driver list to only contain drivers that are loaded
     dpdk_drivers = [mod["Name"] for mod in mods if mod["Found"]]
-- 
1.8.4.2

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

end of thread, other threads:[~2015-03-05 20:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-26  4:57 [PATCH] tools/dpdk_nic_bind: Fix can't bind virtio-pci issue Ouyang Changchun
     [not found] ` <1424926669-14202-1-git-send-email-changchun.ouyang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-26  5:52   ` Xu, Qian Q
2015-03-03 11:43   ` Bruce Richardson
2015-03-04  2:41     ` Ouyang, Changchun
2015-03-04  2:55   ` [PATCH v2] " Ouyang Changchun
2015-03-04 11:31     ` Qiu, Michael
     [not found]       ` <533710CFB86FA344BFBF2D6802E60286CEE857-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-05 20:31         ` Thomas Monjalon

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