From patchwork Thu Oct 12 08:18:25 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: 30191 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 D9B781B23C; Thu, 12 Oct 2017 10:18:55 +0200 (CEST) Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 4FCF825B3 for ; Thu, 12 Oct 2017 10:18:51 +0200 (CEST) Received: by mail-wm0-f51.google.com with SMTP id u138so10824682wmu.5 for ; Thu, 12 Oct 2017 01:18:51 -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=GLBF8Zxyr6Y7mmRiI9C8SZ1/2px/NpwSOr2iOimCbGU=; b=Iu5vvBIlCcJ6+XBI1qIxCxD3PzJxbd+vbo4jaSdrvGWRnnDy+q4j9el6vP8pqWVmgS NBBwscseTKRxzfsfv5cd5yVmiV+Lgsc3M/mzD4TcXGiTqgqySnK4BYHQVEr8ZgXBx8V6 DxQvezWOB2utnsrG2pE6tvAwjFljKieuuQHqPUF0+iWaNrCT67BdJTlmWMSE08H9XLBW 8Hv+CSmYew1xTDygCfzyX1fTDUBUhWyU40QdiAHpUexoV6H3A5Vo6cIuG4KKg0TJhk1Q /TArcQKx1iZI/8fT/AbJnbPJtOEsgIc00kGoAYpFSBenUMr1sBr294bAoCo0P1SGDC2x sRKA== 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=GLBF8Zxyr6Y7mmRiI9C8SZ1/2px/NpwSOr2iOimCbGU=; b=kJjWbEaqneTBVf6P5UtQIqgyw3nc6kQh0/8WgpP15dzmglgHfJqddNMdv6PGELWraK PyQ6++tD1rcPvJI6yd1XE81Xf93NMBShU3h9dqQpn5YaIEdhm51p3ZltUce1GZLA90cR Hh1fTQINb3Yaa1xPMYtqeYCtOniL1HiUoymDg3fFZncs58RKJnIa4X31sR3IFFDqjCQ+ SEvNw8lS9hBwpc541jr+CSnDP6t0Xr+r+dWXlCl9/WrXy3Isl13E4YnTkzJoO2qWvyX3 wvNkoVZ/9dSYGd6POHN3epBe1QE5eQv5mZ6hHnmh/h6NsED+fsCcY8Rf6Nyh09gMismw fcKA== X-Gm-Message-State: AMCzsaVlkjgs7CrhJfeHjuzNKl5bxUd0xGA/hec9nHdbMDldQCbsoDmB IMrsyOdK1J+UGfNkU+VdtUYNVSeH X-Google-Smtp-Source: AOwi7QDO8sKwrfJkTSx1rxilpRLZQePKl6WgXS/R1UVtPQzyOoFVcuSVXvIgByZMdBDbcGkRI3+OTw== X-Received: by 10.223.184.246 with SMTP id c51mr1452952wrg.250.1507796330545; Thu, 12 Oct 2017 01:18:50 -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.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Oct 2017 01:18:49 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 12 Oct 2017 10:18:25 +0200 Message-Id: <793b4998c5c70441370d82905ee6db7c14a81918.1507796085.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v1 3/8] bus: remove probe mode configuration structure 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 configuration item will be implemented within the new flexible framework. Signed-off-by: Gaetan Rivet --- drivers/bus/pci/pci_common.c | 5 +---- lib/librte_eal/common/eal_common_devargs.c | 8 -------- lib/librte_eal/common/include/rte_bus.h | 8 -------- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c index cc23a39..dc69113 100644 --- a/drivers/bus/pci/pci_common.c +++ b/drivers/bus/pci/pci_common.c @@ -370,12 +370,9 @@ rte_pci_probe(void) struct rte_pci_device *dev = NULL; size_t probed = 0, failed = 0; struct rte_devargs *devargs; - int probe_all = 0; + int probe_all = 1; int ret = 0; - if (rte_pci_bus.bus.conf.probe_mode != RTE_BUS_PROBE_WHITELIST) - probe_all = 1; - FOREACH_DEVICE_ON_PCIBUS(dev) { probed++; diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c index f5ef913..e371456 100644 --- a/lib/librte_eal/common/eal_common_devargs.c +++ b/lib/librte_eal/common/eal_common_devargs.c @@ -156,7 +156,6 @@ int rte_eal_devargs_add(enum rte_devtype devtype, const char *devargs_str) { struct rte_devargs *devargs = NULL; - struct rte_bus *bus = NULL; const char *dev = devargs_str; /* use calloc instead of rte_zmalloc as it's called early at init */ @@ -167,15 +166,8 @@ rte_eal_devargs_add(enum rte_devtype devtype, const char *devargs_str) if (rte_eal_devargs_parse(dev, devargs)) goto fail; devargs->type = devtype; - bus = devargs->bus; if (devargs->type == RTE_DEVTYPE_BLACKLISTED_PCI) devargs->policy = RTE_DEV_BLACKLISTED; - if (bus->conf.probe_mode == RTE_BUS_PROBE_UNDEFINED) { - if (devargs->policy == RTE_DEV_WHITELISTED) - bus->conf.probe_mode = RTE_BUS_PROBE_WHITELIST; - else if (devargs->policy == RTE_DEV_BLACKLISTED) - 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 bd3c28e..a8fb6b1 100644 --- a/lib/librte_eal/common/include/rte_bus.h +++ b/lib/librte_eal/common/include/rte_bus.h @@ -177,13 +177,6 @@ enum rte_bus_probe_mode { }; /** - * A structure used to configure bus operations. - */ -struct rte_bus_conf { - enum rte_bus_probe_mode probe_mode; /**< Probe policy. */ -}; - -/** * Bus configuration items. */ enum rte_bus_ctrl_item { @@ -254,7 +247,6 @@ struct rte_bus { rte_bus_plug_t plug; /**< Probe single device for drivers */ rte_bus_unplug_t unplug; /**< Remove single device from driver */ rte_bus_parse_t parse; /**< Parse a device name */ - struct rte_bus_conf conf; /**< Bus configuration */ rte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu class */ rte_bus_ctrl_get_t ctrl; /**< Get control operators */ };