tools: fix binding to unsupported driver
tools: fix binding to unsupported driver

The dpdk_nic_bind script will not allow ports to be bound or unbound if none of the
kernel modules supported by DPDK is loaded. This patch relaxes this restriction by
checking if a DPDK module is actually requested. The example below illustrates this
problem:

In virtio test, on the 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 script 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 <593bf1f161e79772915ea885e47cf0e95f4498c0@intel.com>
Tested-by: Qian Xu <81156ea8c687d383f58bd067d87c20618b5afdb1@intel.com>
Acked-by: Michael Qiu <f0309ca2255ec42822adda7c4b8f366ca4bb5572@intel.com>

phermansson/dpdk,phermansson/dpdk,phermansson/dpdk,phermansson/dpdk