From patchwork Thu Oct 26 10:06:03 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: 30957 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 BA6E01BB0C; Thu, 26 Oct 2017 12:07:04 +0200 (CEST) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 006431BAA9 for ; Thu, 26 Oct 2017 12:06:49 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id m72so6878299wmc.1 for ; Thu, 26 Oct 2017 03:06:49 -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=xIO7PQuYL/nSU+2IEpEW81Q4TNoG6Ebb61NcKfQN+Ug=; b=dWQpo6zyG7Ry96r8I1YuEAOG0eex0zNlzZXx+K7wPNisrFFfc4g6ZST6bakfHvT7Kq 8tQG1YoNC/vzBafzz6YRS2cOg1o5E3S3E/+/Jsj+NqqpJ/xe3fnh/z7DT8DdCIVDKdx/ gsyS+LyYP/wDY+II293yKforSabakY92jANh5CxfOSdC6g1iVqP7QUYbRbTBcrKKPbbz 5eREV6atLVs+9/Gjq+2R7s8VlxOgXDTTCKML1OxAx3ZIdg9/42eT57rZVYs98nQMBCjp 5PgOl+SipVPB2fbA6lP0/wOFX0FqJ/2vR+Qj2urP6SntkWP/YtXrBPUvo4HRU2zSunvz 5xaA== 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=xIO7PQuYL/nSU+2IEpEW81Q4TNoG6Ebb61NcKfQN+Ug=; b=j2NOkFdZx0wR/ZyV/sNLGAb2sqRaYvQvKxirR0eHELgV8LtJF/z+AVgj3UClGLrBbl QXx+BluQ8YZ6j1Y687v/NjTmejgoqTnUm4EWQHSnYtVXwYShmKJDvxaI52FVCr8L71LO STm9uKaHU6UEG2n1iV1hL8U8UWR9KbLvKtqtaHJDCQeEEuuTqaEXkfSgZObclA6TRHgt evMCkLhP4GgpQjM396MT0ry/4B8NZLos307FdG2HpyIzaUv6d0Ncf4oS1uC2RlWB+KmC WqTLVaz0t5M33iB37+4K/ydj/dbRhckWtUUBSYestiUmF1pNdI1FP5BgxSXLHs2BetTj ymVA== X-Gm-Message-State: AMCzsaVzsmhkB9sn/lIDRa85yGWwBCPsqGaaDIJdD6M7uw8HrpqZ33kP GSi9V+kWbYUMAY5iEqzVVkbgf8G+ X-Google-Smtp-Source: ABhQp+SZYZ/hGtwQ40gCcrYpMJqRsR7P32WpxNmbVsvdp7ZqpY4eoMS+OqakBJ/SdVXN8HGOtL5fvg== X-Received: by 10.80.245.73 with SMTP id w9mr25825299edm.144.1509012408918; Thu, 26 Oct 2017 03:06:48 -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 u12sm3339619edk.45.2017.10.26.03.06.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Oct 2017 03:06:48 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 26 Oct 2017 12:06:03 +0200 Message-Id: <6047f7a037bd6b2f50fbde37f5c83bf0bb3802b8.1509012196.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 v8 18/25] 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 --- lib/librte_eal/common/eal_private.h | 49 +++++++++++++++++++++++++++++++++ lib/librte_eal/common/include/rte_pci.h | 49 --------------------------------- lib/librte_eal/rte_eal_version.map | 4 --- 3 files changed, 49 insertions(+), 53 deletions(-) diff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h index 80fea24..8f949fb 100644 --- a/lib/librte_eal/common/eal_private.h +++ b/lib/librte_eal/common/eal_private.h @@ -114,6 +114,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 pci_name_set(struct rte_pci_device *dev); diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index 11ade4d..ca753b5 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -331,25 +331,6 @@ int rte_eal_compare_pci_addr(const struct rte_pci_addr *addr, */ int rte_pci_addr_parse(const char *str, struct rte_pci_addr *addr); -/** - * 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 * @@ -435,36 +416,6 @@ void *pci_map_resource(void *requested_addr, int fd, off_t offset, void pci_unmap_resource(void *requested_addr, size_t size); /** - * 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/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map index 180eee8..754c6c3 100644 --- a/lib/librte_eal/rte_eal_version.map +++ b/lib/librte_eal/rte_eal_version.map @@ -166,18 +166,14 @@ DPDK_17.05 { rte_log_set_global_level; rte_log_set_level; rte_log_set_level_regexp; - 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;