From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by dpdk.org (Postfix) with ESMTP id 5F139E5D for ; Tue, 24 Apr 2018 01:55:18 +0200 (CEST) Received: by mail-wr0-f195.google.com with SMTP id s18-v6so45723934wrg.9 for ; Mon, 23 Apr 2018 16:55:18 -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=l+vlqMd83WlbaJld7zsd2diZ+et3mwxKYXgFJsfw4rA=; b=LZLK/hppXwHwN5sk6J7AlslVXp8A/ZNiz7BxFnF2f1tMQ0KrwROE23I0IcP2j+2oqM oakx4TvDCsdpNAK1/EHeQP3JbwK4rmUbOybqO1qnaFPimsKid0YeR4fJ7e52hKRBk5Bu BL+tt/19CN2W+hBqIjqq66Y0z5CoIZufyHoqyJJRqDBbw3xuzjbGMJ7kms+YDux3mji1 7DRk2iLupcu+TR4XIWsH9KBDWxWLL31u5UxUkOsgn+42pJB0wwkrjERtxqRbwxGsoRn7 uspDZLP8PfL6xm+pndS+XATvQtgCItCCxdl1IxFHDkMR+W4IDCfSCsTdAsbyU6gVXKm7 UFrw== 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=l+vlqMd83WlbaJld7zsd2diZ+et3mwxKYXgFJsfw4rA=; b=e7FHO1l/NUY4JoC0Ww8DWapFyyGJmFFTDFgufStOLX5BxL0HK/BxakTZwztSDmicWu uGKkUrFoep2ye3xrnnqXl9lbhXm4lOezlSn03rjC02dZwd1wHjoQqGNNXY4OBnVwCi7/ keFmNZ01Qu9FYiNYj1Ox5cRAH5TV4rMeuCeNrg4/Or1oOWXeVoOrqFJML5TsPbDzdjGO HnN4k3F7XOnvjo1OlSY8Fbf9wqfS+PAc04IaHQIxlkVD71OzWKGJiggjT8yIfivY2OBn Hs5XAnYvL1XX3uL9bJWkf8BNqm8DZF010SgMv7OUXw0Krb5lZYwtKzBzpKJM8Z81sxGq P7FA== X-Gm-Message-State: ALQs6tDhsDUvBVqoq5DveTnssu4QtI1BupcbZj/Q19Sbs9Ad0eGjWeSB V+h3OKSJOpH3iYuKO9U0UmlnIBQG X-Google-Smtp-Source: AIpwx48zCPx0XYEk9AZ8FT0B7mbv4XISjX5yToPDgfuiUuCh/ogHCTwXsnaUk5xwEoHI6v39l0Lnpg== X-Received: by 10.28.191.206 with SMTP id o75mr10118284wmi.122.1524527717733; Mon, 23 Apr 2018 16:55:17 -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 55-v6sm28922279wrw.52.2018.04.23.16.55.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Apr 2018 16:55:16 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Tue, 24 Apr 2018 01:54:45 +0200 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v5 03/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: Mon, 23 Apr 2018 23:55:19 -0000 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 804a198d1..c03722c13 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