From patchwork Thu Oct 12 10:45:43 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: 30241 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 729D01B2A0; Thu, 12 Oct 2017 12:46:42 +0200 (CEST) Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 716661B24C for ; Thu, 12 Oct 2017 12:46:23 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id i124so12106424wmf.3 for ; Thu, 12 Oct 2017 03:46:23 -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=r6SNwJekdJi+apQud71HFQLVG6T/Jk5BDMXNjk/5/n0=; b=I9SLF+xbYAc3JcBKgwHtIX690DL3RESpVmPnpfzRsTXbw3i2cnTZaL3nKpU/RhkMAV 3KzWFDWtRdGmXp1pfHBtNo9HuG5q/VZBQbrqmxKhZ2ifR5luJh6iQ1paJDi8HOH6qu5j qGaEZehdGFxVnECjHcu0vPhkZiVSx+fpYTLeKbYUBspJFX1+jCZ96p1dKNDKH3cg/+Tz J8S8fATWi/W3noa5POPO7g8TfruY87oEAMqg8teq9CPYtu+QJ/AY3Cew5vhfSVi36VPk GvlZyMyrvdNxUOSis9c4O88fWAmhK87V44lsz/5UR/aCj/wLH/4DwCUCHDGR8ibXLk3O 0/iw== 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=r6SNwJekdJi+apQud71HFQLVG6T/Jk5BDMXNjk/5/n0=; b=ns10kQG4F9Eug4wyqLMMjdSenf/PuBnBnV+ceOPpqilvcWwudop7j4HPomBC2xuUB1 yKopERtHXO5HDO5n8rbcZGrEKexYOYaSID0gFz2d45QFAo/f9FH/+aMa0RzqjmtEAhmu I59nixEfmQAk+rhxBpzBRU9V2nm+PzaQ8wMMjafYBZhV+wMm/l1iDBOJ5dW8OJRzsrYA qGcRXosngU14QsQpHZ0EHNuUSDema7QdYiYt6BrgClL6H2+1A5pHPKUaYcVU7yg4tRMw YGyUSdzRoobLAR9o7uqanfWy5PQaWDBGu8oXPdrf7GBzGN1dPaCwLAqMBZVcwQvu5m6S /GHw== X-Gm-Message-State: AMCzsaXbzcNWDsOIZewt6Zs17IDq2s1CjGiEpqOcdDhEAu1PBI31YyHG 1KVaupmgWeOpkiYmYeh60QuKCCNf X-Google-Smtp-Source: AOwi7QBwbkHYBSm+rsKGz9to6eXsTitB30tiJ61wbwy1qTYhFURvNICHFFYRU8SvnTdpGb3KyaxQ8Q== X-Received: by 10.223.163.208 with SMTP id m16mr2056367wrb.63.1507805182610; Thu, 12 Oct 2017 03:46:22 -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 z192sm16481146wmz.28.2017.10.12.03.46.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Oct 2017 03:46:21 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 12 Oct 2017 12:45:43 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v5 16/20] bus/pci: do not expose private functions 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" make the functions + rte_pci_detach + rte_pci_probe + rte_pci_probe_one + rte_pci_scan private as there is no point in using them outside of the rte_bus framework. Signed-off-by: Gaetan Rivet --- drivers/bus/pci/include/rte_bus_pci.h | 49 --------------------------------- drivers/bus/pci/private.h | 49 +++++++++++++++++++++++++++++++++ drivers/bus/pci/rte_bus_pci_version.map | 4 --- 3 files changed, 49 insertions(+), 53 deletions(-) diff --git a/drivers/bus/pci/include/rte_bus_pci.h b/drivers/bus/pci/include/rte_bus_pci.h index e6a7998..d188353 100644 --- a/drivers/bus/pci/include/rte_bus_pci.h +++ b/drivers/bus/pci/include/rte_bus_pci.h @@ -170,25 +170,6 @@ struct rte_pci_bus { /** Device driver supports IOVA as VA */ #define RTE_PCI_DRV_IOVA_AS_VA 0X0040 -/** - * Scan the content of the PCI bus, and the devices in the devices - * list - * - * @return - * 0 on success, negative on error - */ -int rte_pci_scan(void); - -/** - * Probe the PCI bus - * - * @return - * - 0 on success. - * - !0 on error. - */ -int -rte_pci_probe(void); - /* * Match the PCI Driver and Device using the ID Table * @@ -242,36 +223,6 @@ int rte_pci_map_device(struct rte_pci_device *dev); void rte_pci_unmap_device(struct rte_pci_device *dev); /** - * Probe the single PCI device. - * - * Scan the content of the PCI bus, and find the pci device specified by pci - * address, then call the probe() function for registered driver that has a - * matching entry in its id_table for discovered device. - * - * @param addr - * The PCI Bus-Device-Function address to probe. - * @return - * - 0 on success. - * - Negative on error. - */ -int rte_pci_probe_one(const struct rte_pci_addr *addr); - -/** - * Close the single PCI device. - * - * Scan the content of the PCI bus, and find the pci device specified by pci - * address, then call the remove() function for registered driver that has a - * matching entry in its id_table for discovered device. - * - * @param addr - * The PCI Bus-Device-Function address to close. - * @return - * - 0 on success. - * - Negative on error. - */ -int rte_pci_detach(const struct rte_pci_addr *addr); - -/** * Dump the content of the PCI bus. * * @param f diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h index fdc2c81..455c81d 100644 --- a/drivers/bus/pci/private.h +++ b/drivers/bus/pci/private.h @@ -43,6 +43,55 @@ struct rte_pci_driver; struct rte_pci_device; /** + * Probe the PCI bus + * + * @return + * - 0 on success. + * - !0 on error. + */ +int +rte_pci_probe(void); + +/** + * Scan the content of the PCI bus, and the devices in the devices + * list + * + * @return + * 0 on success, negative on error + */ +int rte_pci_scan(void); + +/** + * Probe the single PCI device. + * + * Scan the content of the PCI bus, and find the pci device specified by pci + * address, then call the probe() function for registered driver that has a + * matching entry in its id_table for discovered device. + * + * @param addr + * The PCI Bus-Device-Function address to probe. + * @return + * - 0 on success. + * - Negative on error. + */ +int rte_pci_probe_one(const struct rte_pci_addr *addr); + +/** + * Close the single PCI device. + * + * Scan the content of the PCI bus, and find the pci device specified by pci + * address, then call the remove() function for registered driver that has a + * matching entry in its id_table for discovered device. + * + * @param addr + * The PCI Bus-Device-Function address to close. + * @return + * - 0 on success. + * - Negative on error. + */ +int rte_pci_detach(const struct rte_pci_addr *addr); + +/** * Find the name of a PCI device. */ void diff --git a/drivers/bus/pci/rte_bus_pci_version.map b/drivers/bus/pci/rte_bus_pci_version.map index c1973f6..ee67033 100644 --- a/drivers/bus/pci/rte_bus_pci_version.map +++ b/drivers/bus/pci/rte_bus_pci_version.map @@ -1,18 +1,14 @@ DPDK_17.11 { global: - rte_pci_detach; rte_pci_dump; rte_pci_ioport_map; rte_pci_ioport_read; rte_pci_ioport_unmap; rte_pci_ioport_write; rte_pci_map_device; - rte_pci_probe; - rte_pci_probe_one; rte_pci_read_config; rte_pci_register; - rte_pci_scan; rte_pci_unmap_device; rte_pci_unregister; rte_pci_write_config;