[dpdk-dev,v5,14/20] pci: make specialized parsing functions private
Checks
Commit Message
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 <gaetan.rivet@6wind.com>
---
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(-)
@@ -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_*
@@ -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)
@@ -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;