From patchwork Thu Oct 12 08:18:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ga=C3=ABtan_Rivet?= X-Patchwork-Id: 30189 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0C27B1B22A; Thu, 12 Oct 2017 10:18:53 +0200 (CEST) Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 83D852A5E for ; Thu, 12 Oct 2017 10:18:48 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id m72so10875727wmc.1 for ; Thu, 12 Oct 2017 01:18:48 -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=qj9ZKS/GZlUtNHsoP0nk37Lg8/SVgZKG3vYmGTN6rlE=; b=la9a5qX2sT7ZK7/ccjnDTu2lxnijS1ve/PIkcYm1h1YAoEfxJiR3FS8AfaCeI1AD60 Q6oHcyhMjnrYKptphU7oYvR56EtU6J9vqQqOZ91RCoEH3XTXTwmHKdljtEk/dwfkR5t1 9X/2tkSQ8Px6HNuj4CfQeQjInB92NNpirSF8si4Uvf6VpiF0PvPbryb5eo4mzSZjysN8 xjvvqMICfYntaqGqoITAP+1nPPHrCRXNrD7LEP2CcWj+MjD9EDnz8az5+CGuerx7JmIk ArJcZFBvgD5189unApL9PBM68AM9OGyEEiIpVahs4QSqkhGBydwBJwPrt04vZfbaEnbl LwFQ== 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=qj9ZKS/GZlUtNHsoP0nk37Lg8/SVgZKG3vYmGTN6rlE=; b=bP72cGkIDU4R+IhshY38cgEzoVlkuHr+itYshskOHW37PffTlUiO44T30/36O2ft9a TUSQdCzz7oGSnB4QCGmCbxpGods0TEg23aQaYoFhN69y7+RsNPb7CiPNVcA7pwIB2E9k PMBXk9s3WWvFEOZbTesm+ilPg066qZyzY9Y77Bfda6/gOnPXh/68hoqK7skDK8gzrTjB fgC4s/Drl886jLusfrVSCIqRkawMSYVQtykB3H740W5pnl2uSZCgCwQvOqF3OuKiOECa g2hI0dtusJ9VXuRpYkycEdASK//wP9ilPldQ3GjLnjtNPAzyFhzKS9vQ4xxmp25jDOMq Hwvg== X-Gm-Message-State: AMCzsaVktpi4oCtdIXW+Xn9AoLtulNlAoU3nlEq6zHVH9LlbFN4/1dv3 syBYywuKZRycmHYjtuufyes9aKgv X-Google-Smtp-Source: AOwi7QCVqDJ7FIToP6877noWpv15DjPrBYg3+OXXj2uDtwb1EaC7yKqCt8ZecJBJoVFSh4U+k61Esg== X-Received: by 10.223.195.131 with SMTP id p3mr1468480wrf.89.1507796327847; Thu, 12 Oct 2017 01:18:47 -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 i76sm39971757wmd.2.2017.10.12.01.18.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Oct 2017 01:18:46 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 12 Oct 2017 10:18:23 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v1 1/8] bus: rename scan policy as probe policy 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This bus configuration item is misnamed, as it actually refers to the probing process. Signed-off-by: Gaetan Rivet --- drivers/bus/pci/pci_common.c | 2 +- lib/librte_eal/common/eal_common_devargs.c | 6 +++--- lib/librte_eal/common/include/rte_bus.h | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c index d7a1c05..cc23a39 100644 --- a/drivers/bus/pci/pci_common.c +++ b/drivers/bus/pci/pci_common.c @@ -373,7 +373,7 @@ rte_pci_probe(void) int probe_all = 0; int ret = 0; - if (rte_pci_bus.bus.conf.scan_mode != RTE_BUS_SCAN_WHITELIST) + if (rte_pci_bus.bus.conf.probe_mode != RTE_BUS_PROBE_WHITELIST) probe_all = 1; FOREACH_DEVICE_ON_PCIBUS(dev) { diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c index 6ac88d6..f5ef913 100644 --- a/lib/librte_eal/common/eal_common_devargs.c +++ b/lib/librte_eal/common/eal_common_devargs.c @@ -170,11 +170,11 @@ rte_eal_devargs_add(enum rte_devtype devtype, const char *devargs_str) bus = devargs->bus; if (devargs->type == RTE_DEVTYPE_BLACKLISTED_PCI) devargs->policy = RTE_DEV_BLACKLISTED; - if (bus->conf.scan_mode == RTE_BUS_SCAN_UNDEFINED) { + if (bus->conf.probe_mode == RTE_BUS_PROBE_UNDEFINED) { if (devargs->policy == RTE_DEV_WHITELISTED) - bus->conf.scan_mode = RTE_BUS_SCAN_WHITELIST; + bus->conf.probe_mode = RTE_BUS_PROBE_WHITELIST; else if (devargs->policy == RTE_DEV_BLACKLISTED) - bus->conf.scan_mode = RTE_BUS_SCAN_BLACKLIST; + bus->conf.probe_mode = RTE_BUS_PROBE_BLACKLIST; } TAILQ_INSERT_TAIL(&devargs_list, devargs, next); return 0; diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h index 6fb0834..331d954 100644 --- a/lib/librte_eal/common/include/rte_bus.h +++ b/lib/librte_eal/common/include/rte_bus.h @@ -168,19 +168,19 @@ typedef int (*rte_bus_unplug_t)(struct rte_device *dev); typedef int (*rte_bus_parse_t)(const char *name, void *addr); /** - * Bus scan policies + * Bus probe policies */ -enum rte_bus_scan_mode { - RTE_BUS_SCAN_UNDEFINED, - RTE_BUS_SCAN_WHITELIST, - RTE_BUS_SCAN_BLACKLIST, +enum rte_bus_probe_mode { + RTE_BUS_PROBE_UNDEFINED, + RTE_BUS_PROBE_WHITELIST, + RTE_BUS_PROBE_BLACKLIST, }; /** * A structure used to configure bus operations. */ struct rte_bus_conf { - enum rte_bus_scan_mode scan_mode; /**< Scan policy. */ + enum rte_bus_probe_mode probe_mode; /**< Probe policy. */ };