Allow to run without igb_uio if probed devices don't require it.
The condition for exiting with an error is:
- Tested driver is needed by a probed device
AND
- Tested driver needs igb_uio
Signed-off-by: Damien Millescamps <damien.millescamps@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
{
struct rte_pci_id *id_table;
const char *module_name = NULL;
{
struct rte_pci_id *id_table;
const char *module_name = NULL;
if (dr->drv_flags & RTE_PCI_DRV_NEED_IGB_UIO)
module_name = IGB_UIO_NAME;
if (dr->drv_flags & RTE_PCI_DRV_NEED_IGB_UIO)
module_name = IGB_UIO_NAME;
- ret = pci_uio_check_module(module_name);
- if (ret != 0)
- rte_exit(1, "The %s module is required by the %s driver\n",
- module_name, dr->name);
+ uio_status = pci_uio_check_module(module_name);
for (id_table = dr->id_table ; id_table->vendor_id != 0; id_table++) {
for (id_table = dr->id_table ; id_table->vendor_id != 0; id_table++) {
RTE_LOG(DEBUG, EAL, "probe driver: %x:%x %s\n",
dev->id.vendor_id, dev->id.device_id, dr->name);
RTE_LOG(DEBUG, EAL, "probe driver: %x:%x %s\n",
dev->id.vendor_id, dev->id.device_id, dr->name);
+ if ((!dev->blacklisted) && (uio_status != 0)) {
+ rte_exit(1, "The %s module is required by the %s driver\n",
+ module_name, dr->name);
+ }
+
/* Unbind PCI devices if needed */
if ((!dev->blacklisted) &&
(module_name != NULL)) {
/* Unbind PCI devices if needed */
if ((!dev->blacklisted) &&
(module_name != NULL)) {