From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id D24885F4A for ; Wed, 21 Mar 2018 00:20:38 +0100 (CET) Received: by mail-wm0-f66.google.com with SMTP id r82so6659455wme.0 for ; Tue, 20 Mar 2018 16:20:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=tNxHD6hmXt6OfnmYoo+f6x9PjEUjn8/vmr9cIeKy2ck=; b=SWfHjEAqqEi9jBoyMfY761qhHrxMWuI5fvbrpVmW4jfo4rLCxdoINHt4IPqsP8Vnnz IzbvQNAdCF3NdjLuKCi+rXO/x7XsrI8LspKJQHFr+v04ZsBV+49mEbxWlBjAEGlKmDry M3+6iN2J+bEe+dRjYCU339dGpnnU0Zu1rQdNvJAgqfCKpyxjed0z4lBd00CxWsJq/VhW GIVFEOOKuinOakmNMdRphYy0S7GxUWrwGFpcPF14LaAt9di1sTICIMljn+vklcNwuhoZ orHL0YWnmn6KWSXnPIyg661giFyafmWcJu/v+WG8tsQKG4Qv2ltQDYgd7GVctac95eLC S44g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=tNxHD6hmXt6OfnmYoo+f6x9PjEUjn8/vmr9cIeKy2ck=; b=XWNxnLS3VYyiMKDVYt5UOjDOON+m5vxQJmGv8CZQ/icWt2KXkXWc9B+XI4ATxL6q9x F2gdvfMfp2G2sfOT7xyBysVVvbotRgd6dKM2bw4NtACjkTxRERyVzEbsmHlQsyQhtU6W LlDavYCou7jvMIbC+aImxW2Om4zCEPs/hYJqFTX5TVyDlVar69KTOFqWX+bccKf8qzpk T6Q1GoHxY8qnyKgYYu0iFSB/9jdeauVm6bywadg8A0wW9jhiMeFe0mtfeoyJWoOUnGHO qCztB7OSS7X8ttPtpu+tRIkKfZivSrKhkYO0wzG58bi86/Ih9rdlNGWNuHQ8Ts9azmrT jrHg== X-Gm-Message-State: AElRT7EMyDrQFhr4Ox/mgfItOOaWycuc/nAkhVb7EJpzNeWjl0IrsHkS EIrJhkRmQKbFrnlWLNDJh+pPGT1m X-Google-Smtp-Source: AG47ELtOydCWJU/qG25CYlQ4FjI+gviWLurS1uz5BsB8xfQZrrD5P5ctrm6SvGiDQKDenGRWOrd0Tg== X-Received: by 10.28.216.145 with SMTP id p139mr1096637wmg.82.1521588038126; Tue, 20 Mar 2018 16:20:38 -0700 (PDT) Received: from bidouze.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id m135sm3983479wma.2.2018.03.20.16.20.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 16:20:36 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Wed, 21 Mar 2018 00:20:05 +0100 Message-Id: <6408d3b809e6e83720f8d6a350f3dbe48884e422.1521587199.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v3 04/10] bus/pci: do not reference devargs list X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2018 23:20:39 -0000 This list should not be used by drivers. Use the public API instead. Signed-off-by: Gaetan Rivet --- 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 f3df1c4ce..73796ec0e 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 2a00f365a..6bed0bc9d 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.11.0