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 C1304A69 for ; Tue, 24 Apr 2018 00:41:39 +0200 (CEST) Received: by mail-wr0-f195.google.com with SMTP id q3-v6so35450373wrj.6 for ; Mon, 23 Apr 2018 15:41:39 -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=YJtcQn4L9O9mvypAb5mQGiZrG71busyB66QAjOxaBPM=; b=ktlrO0PAesA5beMgGKUhxp4N0yj5QVz2CGSY1WoCS1Brx2GSKdXGHb/Jp0Ku1Rawts rAwfLrneg/54mSXbVn3F5RUEENBNj+xFn7Utji04aItAnCq8t8TscbLnfLXPEDJHcKEu 45QBASwrer/tyLHeJhP998jLUyWlTJDww+9yAa42GyZJDfto0VLKSL+L3QKa0bC9Kvz5 ApH5O5A43wO/YgpTd9nJW7GXTPuCJU782s/S7EMlQXJlzfJYEl7qDFidksPria+m7kP1 uUVxtt9isNhsIQ4MhXuzMgPS1su6+CujhAbXPWUaR+xxoWYiHORZqssz4GW0GEI+8w8m qrlg== 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=YJtcQn4L9O9mvypAb5mQGiZrG71busyB66QAjOxaBPM=; b=Vt/2SJk7LA1HcIJXgTYDvdt3TrDARs55LMReKBiygpR5RSm3RQGuhUS+RPbmWtHPj9 9a7A9UZa9XpBnrLfE8+KyjUkMCEZMCTz4CfRJ3FeQ0UJCqbtaVd8hIz6Hn7ybgsGnHRl tDgjextzyN42HOBRZEMMHpO51YJJsvI4plz+MwkjDRuew3m63ghl+rM/DY/rOJF+fHcy Yg7gTigADXspsLGGJut/DvGEfZzPw2nY7kKcXl0cLYqVA2OkE8dYcNI/TYlsEV14Syq2 gDt1eAcAf/eJRBmMGcTwnVk1ItTmxFugBSt8Y0rbbXGlyuDSNnruIFc052P1bsBnnoGb aXEg== X-Gm-Message-State: ALQs6tBpkX77Q8wK6UWhmNONLX6QdUehNQp5uUg4yuoSv63CZ16allZ/ jHP7SAE9tSa3u6+abfyA0wBARrcR X-Google-Smtp-Source: AIpwx49n61EjsMbKEyVQxRJCcJ9nFiyvVHpIXeJoIJifPfXsW/xBZBGnwElAKXPaCoj1gCtSIUICXw== X-Received: by 10.28.168.201 with SMTP id r192mr11021996wme.134.1524523299154; Mon, 23 Apr 2018 15:41:39 -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 x189sm1590705wmg.0.2018.04.23.15.41.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Apr 2018 15:41:38 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Tue, 24 Apr 2018 00:41:04 +0200 Message-Id: <54a1b92c809b627bfa8ef5f70ce6888de3904be0.1524522515.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 v4 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: Mon, 23 Apr 2018 22:41:40 -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 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