From 7765f0f4086605b9f5e3bcf346d0c014b7f02b9a Mon Sep 17 00:00:00 2001 From: Gaetan Rivet Date: Tue, 24 Apr 2018 01:54:45 +0200 Subject: [PATCH] bus/pci: do not reference devargs list This list should not be used by drivers. Use the public API instead. Signed-off-by: Gaetan Rivet Acked-by: Thomas Monjalon --- drivers/bus/pci/Makefile | 1 + drivers/bus/pci/pci_common.c | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/bus/pci/Makefile b/drivers/bus/pci/Makefile index 804a198d17..c03722c13d 100644 --- a/drivers/bus/pci/Makefile +++ b/drivers/bus/pci/Makefile @@ -37,6 +37,7 @@ EXPORT_MAP := rte_bus_pci_version.map CFLAGS := -I$(SRCDIR) $(CFLAGS) CFLAGS += -O3 $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API ifneq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),) SYSTEM := linux diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c index 2a00f365a3..6bed0bc9dc 100644 --- a/drivers/bus/pci/pci_common.c +++ b/drivers/bus/pci/pci_common.c @@ -45,12 +45,8 @@ static struct rte_devargs *pci_devargs_lookup(struct rte_pci_device *dev) { struct rte_devargs *devargs; struct rte_pci_addr addr; - struct rte_bus *pbus; - pbus = rte_bus_find_by_name("pci"); - TAILQ_FOREACH(devargs, &devargs_list, next) { - if (devargs->bus != pbus) - continue; + RTE_EAL_DEVARGS_FOREACH("pci", devargs) { devargs->bus->parse(devargs->name, &addr); if (!rte_pci_addr_cmp(&dev->addr, &addr)) return devargs; -- 2.20.1