From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 9B9076A96 for ; Mon, 29 Sep 2014 12:52:49 +0200 (CEST) Received: by mail-wg0-f41.google.com with SMTP id k14so13097851wgh.24 for ; Mon, 29 Sep 2014 03:59:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=0D0c1zab/n7KV8ZXqK4hapTSyy6OenVP11BA+BKRkmc=; b=mfCobPBRSMp7n8HNlxNfjNpz01zVPmola2ZPcPaSKPFyMoKX5lzgKfCR+k/MWlkCCE DtOjYJYmPBnIbh4Ki3TOoI+KefiUklebZJ0LuVxLCVDhJh0CLdaQE/czd84bJUCc3ZUd puka1KMZGbsh73JeUHani+e2QZQpvVKVxffHqqT8SEvA6ZNEjmqX063u+wORqeVm0CdT 6B9aiGIlgq3s9wEdc3S4nvxaGWxZp3m9lbI37cxz+bQ3S6Frhq5dDnqSGdLO/ulzXFeV pcfnNBt+rCpHjimJfkxLvITPp5vdElCn8vPgdh7vevIzqbPq1tT6+lsJZ1sjxdNkKPLq 0Ojg== X-Gm-Message-State: ALoCoQmSbxaZfLYQ2WvYdfrguDCfQ2WvL6LMpWgSxpD7Tewuup4SKnTbG8rMtaV+d2Em7AVHJ15N X-Received: by 10.194.93.193 with SMTP id cw1mr35853351wjb.50.1411988365123; Mon, 29 Sep 2014 03:59:25 -0700 (PDT) Received: from localhost.localdomain (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id t8sm11295362wib.8.2014.09.29.03.59.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Sep 2014 03:59:24 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Mon, 29 Sep 2014 12:59:06 +0200 Message-Id: <1411988346-20861-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.0.4 Subject: [dpdk-dev] [PATCH] pci: remove flag for multiple devices with single id X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 10:52:49 -0000 The flag RTE_PCI_DRV_MULTIPLE was used to register an eth_driver allowing multiples devices with a single PCI id. It is now possible to register a pci_driver and create ethdev objects using rte_eth_dev_allocate(). Suggested-by: David Marchand Signed-off-by: Thomas Monjalon --- lib/librte_eal/common/eal_common_pci.c | 10 ---------- lib/librte_eal/common/include/rte_pci.h | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index af809a8..f3c7f71 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -103,10 +103,6 @@ static struct rte_devargs *pci_devargs_lookup(struct rte_pci_device *dev) * If vendor/device ID match, call the devinit() function of all * registered driver for the given device. Return -1 if initialization * failed, return 1 if no driver is found for this device. - * For drivers with the RTE_PCI_DRV_MULTIPLE flag enabled, register - * the same device multiple times until failure to do so. - * It is required for non-Intel NIC drivers provided by third-parties such - * as 6WIND. */ static int pci_probe_all_drivers(struct rte_pci_device *dev) @@ -122,12 +118,6 @@ pci_probe_all_drivers(struct rte_pci_device *dev) if (rc > 0) /* positive value means driver not found */ continue; - /* initialize subsequent driver instances for this device */ - if ((dr->drv_flags & RTE_PCI_DRV_MULTIPLE) && - (dev->devargs == NULL || - dev->devargs->type != RTE_DEVTYPE_BLACKLISTED_PCI)) - while (rte_eal_pci_probe_one_driver(dr, dev) == 0) - ; return 0; } return 1; diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index d6b1c1b..66ed793 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -193,8 +193,8 @@ struct rte_pci_driver { /** Device needs PCI BAR mapping (done with either IGB_UIO or VFIO) */ #define RTE_PCI_DRV_NEED_MAPPING 0x0001 -/** Device driver must be registered several times until failure */ -#define RTE_PCI_DRV_MULTIPLE 0x0002 +/** Device driver must be registered several times until failure - deprecated */ +#pragma GCC poison RTE_PCI_DRV_MULTIPLE /** Device needs to be unbound even if no module is provided */ #define RTE_PCI_DRV_FORCE_UNBIND 0x0004 /** Device driver supports link state interrupt */ -- 2.0.4