From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id D1E731BA6D for ; Thu, 26 Oct 2017 00:39:31 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id z3so4695555wme.5 for ; Wed, 25 Oct 2017 15:39:31 -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=xnYMyiyl2bNLoXelThpqR7KxcY22tYkeX7BIPLEQjbq9UwinxmAM6E4tNyX+nuYABo kl52zS05B9fJ6DdJ4zO65R4Vlge+/v4nEBUeERGTIVa3TowQm/dE5hqmNLu9VmlNHYb9 pv8W8F2w+zIUcNIF8IYAfJQ3vFndOlYBMamzfSG+Ymtb2lC1pF/xv9VXrzBHYF91u3dj r7sCy3qRlIC4caX5hKcgN416cXyI0nKqjDb2uVKUAAEeGTRFnj81oc+ThozXV5zgEUIP v11wOTPdqyT6kg0Su/RuGd1mXO0kTqfLJprzM941NxzWTJgsWyUDy00PfVHkQQ/kVNub 4mvg== 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=X6Ya+5uz2iyN3L7OU0ULPO8zZMZzzSPTe7asoZ/WKBu/Wg5GUtTShGk3zGh2bYph1J OCFksSNajSIfwiOBfx2PT9owQDbotPXPW5sCf6+tq5Ix+urAR8aYMHXPXYl+BubG0a14 fWaNJVdWDXW7Cv/pMDn2DEuKoPNTauaMyXWpRqPkoADb/GWcyXA3iUSpdgOoPtKFBSCR qwvyneM38NqH4HylmtYDHkr7WTP514SLPtM8LFot1gvRajLUbP6zeVGz17F6FDIaWQw9 q8++NHxoVXiN/RPgq7vgsj4e/+OtRxp1D4c3iqiVq/oMnwJriKV5LGVhvJuHpYBTjW3z P8Cw== X-Gm-Message-State: AMCzsaXbIvYhofuYwBtBULZbOYWoOT2dVHejQIP8qC0tEpAOMc4MjORf 5mjw32YbzcJfHx5h/lcQ3QKoIaoD X-Google-Smtp-Source: ABhQp+Rg9O0SALs4bdwPipcDALRm690GOVH9LWtzUZmHZP7Gfko4I+eTfJVPQAaVyJVh6k0cayU1FA== X-Received: by 10.28.214.134 with SMTP id n128mr3362475wmg.59.1508971170979; Wed, 25 Oct 2017 15:39:30 -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 r63sm4466124wmg.13.2017.10.25.15.39.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Oct 2017 15:39:30 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 26 Oct 2017 00:38:40 +0200 Message-Id: <1789511fa88d5df3c2f40bb6ca636d2d6eb9d4b2.1508970254.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 v7 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: , X-List-Received-Date: Wed, 25 Oct 2017 22:39:32 -0000 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; -- 2.1.4