[dpdk-dev] [PATCH v7 15/25] pci: make specialized parsing functions private
Gaetan Rivet
gaetan.rivet at 6wind.com
Thu Oct 26 00:38:37 CEST 2017
Do not expose the minute implementations of PCI parsing.
This leaves only the all-purpose rte_pci_addr_parse, which is simpler to
use.
Signed-off-by: Gaetan Rivet <gaetan.rivet at 6wind.com>
---
doc/guides/rel_notes/deprecation.rst | 6 ++----
lib/librte_eal/common/eal_common_pci.c | 4 ++--
lib/librte_eal/common/include/rte_pci.h | 29 -----------------------------
lib/librte_eal/rte_eal_version.map | 2 --
4 files changed, 4 insertions(+), 37 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index f3d7203..4e7f1f5 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -88,8 +88,6 @@ Deprecation Notices
* pci: Several exposed functions are misnamed.
The following functions are deprecated starting from v17.11 and are replaced:
- - ``eal_parse_pci_BDF`` replaced by ``rte_pci_bdf_parse``
- - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_dbdf_parse``
+ - ``eal_parse_pci_BDF`` replaced by ``rte_pci_addr_parse``
+ - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_addr_parse``
- ``rte_eal_compare_pci_addr`` replaced by ``rte_pci_addr_cmp``
-
- The functions are only renamed. Their behavior is not affected.
diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index fdcf005..531dc12 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -105,7 +105,7 @@ get_u8_pciaddr_field(const char *in, void *_u8, char dlm)
}
-int
+static int
rte_pci_bdf_parse(const char *input, struct rte_pci_addr *dev_addr)
{
const char *in = input;
@@ -129,7 +129,7 @@ eal_parse_pci_BDF(const char *input, struct rte_pci_addr *dev_addr)
return rte_pci_bdf_parse(input, dev_addr);
}
-int
+static int
rte_pci_dbdf_parse(const char *input, struct rte_pci_addr *dev_addr)
{
const char *in = input;
diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h
index 11ba442..11ade4d 100644
--- a/lib/librte_eal/common/include/rte_pci.h
+++ b/lib/librte_eal/common/include/rte_pci.h
@@ -241,21 +241,6 @@ struct mapped_pci_resource {
TAILQ_HEAD(mapped_pci_res_list, mapped_pci_resource);
/**
- * 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 rte_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 without
@@ -272,20 +257,6 @@ int rte_pci_bdf_parse(const char *input, struct rte_pci_addr *dev_addr);
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 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 rte_pci_dbdf_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
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index 3568694..180eee8 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -255,8 +255,6 @@ DPDK_17.11 {
rte_memcpy_ptr;
rte_pci_addr_cmp;
rte_pci_addr_parse;
- rte_pci_bdf_parse;
- rte_pci_dbdf_parse;
rte_pci_device_name;
rte_pci_get_iommu_class;
rte_pci_match;
--
2.1.4
More information about the dev
mailing list