[dpdk-dev] [PATCH v5 5/6] eal: map IO port when kernel driver isn't managing the device

Huawei Xie huawei.xie at intel.com
Tue Mar 8 16:33:42 CET 2016


call rte_eal_pci_ioport_map (on x86) only if the pci device is not bound
to a kernel driver.

Signed-off-by: Huawei Xie <huawei.xie at intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
Acked-by: David Marchand <david.marchand at 6wind.com>
---
 lib/librte_eal/linuxapp/eal/eal_pci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c
index 4ede4cb..833529f 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
@@ -698,11 +698,13 @@ rte_eal_pci_ioport_map(struct rte_pci_device *dev, int bar,
 	case RTE_KDRV_UIO_GENERIC:
 		ret = pci_uio_ioport_map(dev, bar, p);
 		break;
-	default:
+	case RTE_KDRV_NONE:
 #if defined(RTE_ARCH_X86)
 		ret = pci_ioport_map(dev, bar, p);
 #endif
 		break;
+	default:
+		break;
 	}
 
 	if (!ret)
-- 
1.8.1.4



More information about the dev mailing list