From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id 1282E1B1AA for ; Thu, 12 Oct 2017 10:17:49 +0200 (CEST) Received: by mail-wm0-f53.google.com with SMTP id 196so22787903wma.1 for ; Thu, 12 Oct 2017 01:17: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=CKP+LH3rMSHFVJPR5Wnl18huK/pUzWv/RZgJIodYcjY=; b=HCnDYqq5BV9PuOMFUKRM+zD+lbcuDXt1+mlk5BX/gbNYNGQq14iUUofuGqE+wLFAdy ltBi17e7dQT3kvC4zdwkQKLghaD9c3nTiDX43017wCbQBHcck6VywpsXayNKPtv9D/JR urc1RyXAVGlUeo0N506l5zIvsVZecptQY5ymbD2n2UbbXuaiH1hVGMMhqG4LM5KuHdHO mnMwDNKXJ7uuDt33U7M4kZxtLN9Pw8vs6zRS0bIR23xVd3JRiUWevC6e9q2O6h7O3xhx D2iMUj1W6FAXU9z725VTveXwPEi39kEgCpFq5pXqra5PdIwfgT7Rob0erdwdjE/FlRss FoDQ== 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=CKP+LH3rMSHFVJPR5Wnl18huK/pUzWv/RZgJIodYcjY=; b=luLOkkODRYqciQRqTtSxR4VTBOA0YeBFr7Fsz5StlFfKQBHR7AdJaPHNyMDDFspF1W 7ywEPTcIoOQd5567xCmCD/FYVHMx6P3OXEVWjlJDMCWimz+ms4JrXlR+kVuw+5oCtIrM CsTkemFiqtAlR6RQCuIjQvTL+KIokRcLfF1NlNo1onnzsZ/cdsRxQXineOaHc4Huoqgi 0Hro0IkfFubOuKKqGgvknEBstX2kOLmZjiBCEJu1pUtXu8UJ4I4+PnJisg8UYGzZ/W6m qwPAZyC1XqcUKFFuSMqoGwg42b6YiUzMc6BHtL+AsDM0zjmdr6rJTRRDnAUejVoPuCBq zoyg== X-Gm-Message-State: AMCzsaWddH1SPv395Cp0Wijk5XT7xwRraaGwFms/2pzo9FsqBFxBN7CK h+lSs1gHYvVJiRtqVnDMGAruZMv5 X-Google-Smtp-Source: AOwi7QAXrQ7csRz3SLZu/CKnncghZUghn+Zr/k+2Ujovd656HPB8Vko3BkGEe/qxETlMqri6oLIOtw== X-Received: by 10.28.218.207 with SMTP id r198mr1066181wmg.14.1507796268344; Thu, 12 Oct 2017 01:17: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 25sm16711227wrv.8.2017.10.12.01.17.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Oct 2017 01:17:47 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 12 Oct 2017 10:17:14 +0200 Message-Id: <258d20848b6da73dd6ae63a9ce511490b1395220.1507795823.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 v4 14/16] pci: make specialized parsing functions private 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: Thu, 12 Oct 2017 08:17:49 -0000 Do not expose the minute implementations of PCI parsing. This leaves only the all-purpose pci_addr_parse, which is simpler to use. Signed-off-by: Gaetan Rivet --- lib/librte_pci/include/rte_pci.h | 29 ----------------------------- lib/librte_pci/rte_pci.c | 28 ++++++++++++++-------------- lib/librte_pci/rte_pci_version.map | 2 -- 3 files changed, 14 insertions(+), 45 deletions(-) diff --git a/lib/librte_pci/include/rte_pci.h b/lib/librte_pci/include/rte_pci.h index 9e79557..ea0897c 100644 --- a/lib/librte_pci/include/rte_pci.h +++ b/lib/librte_pci/include/rte_pci.h @@ -151,21 +151,6 @@ TAILQ_HEAD(mapped_pci_res_list, mapped_pci_resource); int eal_parse_pci_BDF(const char *input, struct rte_pci_addr *dev_addr); /** - * Utility function to produce a PCI Bus-Device-Function value - * given a string representation. Assumes that the BDF is provided without - * a domain prefix (i.e. domain returned is always 0) - * - * @param input - * The input string to be parsed. Should have the format XX:XX.X - * @param dev_addr - * The PCI Bus-Device-Function address to be returned. - * Domain will always be returned as 0 - * @return - * 0 on success, negative on error. - */ -int pci_bdf_parse(const char *input, struct rte_pci_addr *dev_addr); - -/** * @deprecated * Utility function to produce a PCI Bus-Device-Function value * given a string representation. Assumes that the BDF is provided including @@ -181,20 +166,6 @@ int pci_bdf_parse(const char *input, struct rte_pci_addr *dev_addr); int eal_parse_pci_DomBDF(const char *input, struct rte_pci_addr *dev_addr); /** - * Utility function to produce a PCI Bus-Device-Function value - * given a string representation. Assumes that the BDF is provided including - * a domain prefix. - * - * @param input - * The input string to be parsed. Should have the format XXXX:XX:XX.X - * @param dev_addr - * The PCI Bus-Device-Function address to be returned - * @return - * 0 on success, negative on error. - */ -int pci_dbdf_parse(const char *input, struct rte_pci_addr *dev_addr); - -/** * @deprecated * Utility function to write a pci device name, this device name can later be * used to retrieve the corresponding rte_pci_addr using eal_parse_pci_* diff --git a/lib/librte_pci/rte_pci.c b/lib/librte_pci/rte_pci.c index 7ba472c..1307a18 100644 --- a/lib/librte_pci/rte_pci.c +++ b/lib/librte_pci/rte_pci.c @@ -70,13 +70,7 @@ get_u8_pciaddr_field(const char *in, void *_u8, char dlm) return end + 1; } -int -eal_parse_pci_BDF(const char *input, struct rte_pci_addr *dev_addr) -{ - return pci_bdf_parse(input, dev_addr); -} - -int +static int pci_bdf_parse(const char *input, struct rte_pci_addr *dev_addr) { const char *in = input; @@ -94,13 +88,7 @@ pci_bdf_parse(const char *input, struct rte_pci_addr *dev_addr) return 0; } -int -eal_parse_pci_DomBDF(const char *input, struct rte_pci_addr *dev_addr) -{ - return pci_dbdf_parse(input, dev_addr); -} - -int +static int pci_dbdf_parse(const char *input, struct rte_pci_addr *dev_addr) { const char *in = input; @@ -125,6 +113,18 @@ pci_dbdf_parse(const char *input, struct rte_pci_addr *dev_addr) return 0; } +int +eal_parse_pci_BDF(const char *input, struct rte_pci_addr *dev_addr) +{ + return pci_bdf_parse(input, dev_addr); +} + +int +eal_parse_pci_DomBDF(const char *input, struct rte_pci_addr *dev_addr) +{ + return pci_dbdf_parse(input, dev_addr); +} + void rte_pci_device_name(const struct rte_pci_addr *addr, char *output, size_t size) diff --git a/lib/librte_pci/rte_pci_version.map b/lib/librte_pci/rte_pci_version.map index 5f50f98..b5c9ec2 100644 --- a/lib/librte_pci/rte_pci_version.map +++ b/lib/librte_pci/rte_pci_version.map @@ -5,8 +5,6 @@ DPDK_17.11 { eal_parse_pci_DomBDF; pci_addr_cmp; pci_addr_parse; - pci_bdf_parse; - pci_dbdf_parse; pci_device_name; pci_map_resource; pci_unmap_resource; -- 2.1.4