From: Gaetan Rivet Date: Mon, 23 Apr 2018 23:54:45 +0000 (+0200) Subject: bus/pci: do not reference devargs list X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7765f0f4086605b9f5e3bcf346d0c014b7f02b9a;p=dpdk.git 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 --- 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;