From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 60DD45697 for ; Thu, 26 Feb 2015 06:52:52 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 25 Feb 2015 21:47:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,650,1418112000"; d="scan'208";a="657385981" Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105]) by orsmga001.jf.intel.com with ESMTP; 25 Feb 2015 21:52:48 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX107.gar.corp.intel.com (10.221.44.105) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 26 Feb 2015 13:52:46 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.62]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.209]) with mapi id 14.03.0195.001; Thu, 26 Feb 2015 13:52:42 +0800 From: "Xu, Qian Q" To: "Ouyang, Changchun" , "dev@dpdk.org" Thread-Topic: [PATCH] tools/dpdk_nic_bind: Fix can't bind virtio-pci issue Thread-Index: AQHQUYDJYC9RI/5STUiSP4J2g+zmgJ0Ca2yw Date: Thu, 26 Feb 2015 05:52:42 +0000 Message-ID: <82F45D86ADE5454A95A89742C8D1410E01CC7E49@shsmsx102.ccr.corp.intel.com> References: <1424926669-14202-1-git-send-email-changchun.ouyang@intel.com> In-Reply-To: <1424926669-14202-1-git-send-email-changchun.ouyang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] tools/dpdk_nic_bind: Fix can't bind virtio-pci issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2015 05:52:55 -0000 Tested-by: Qian Xu - Tested Commit: b67578ccdf45df9fd0f0204578b71acd854ca834 - OS: Fedora20 3.11 - GCC: gcc version 4.8.3 20140624 - CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz - NIC: Intel 82599 Ethernet 10G SFI/SFP+ Network Connection - Default x86_64-native-linuxapp-gcc configuration - Total 1 case, 1 passed, 0 failed - Case: bind virtio-pci driver when igb_uio is removed Steps: =20 1. Bind virtio port to igb_uio driver; 2. Remove igb_uio module; 3. Bind virtio port to virtio-pci driver, it can be binded to virtio-pci dr= iver and also have a warning that no supported modules(DPDK Driver) are loa= ded. =20 Signed-off-by: Qian Xu =20 -----Original Message----- From: Ouyang, Changchun=20 Sent: Thursday, February 26, 2015 12:58 PM To: dev@dpdk.org Cc: Richardson, Bruce; Cao, Waterman; Ouyang, Changchun Subject: [PATCH] tools/dpdk_nic_bind: Fix can't bind virtio-pci issue 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, oth= erwise, just report a warning, and continue to bind the non-dpdk driver(lik= e virtio-pci) to dev. Signed-off-by: Changchun Ouyang --- 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(): =20 # 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" =20 # change DPDK driver list to only contain drivers that are loaded dpdk_drivers =3D [mod["Name"] for mod in mods if mod["Found"]] -- 1.8.4.2