From ca52fccbb3b9c3409c39650d826ae883a60270d1 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Fri, 25 Oct 2019 15:56:05 +0200 Subject: [PATCH] pci: remove deprecated functions Those functions have been deprecated since 17.11 and have 1:1 replacement. Signed-off-by: David Marchand Acked-by: Thomas Monjalon --- doc/guides/rel_notes/deprecation.rst | 7 ---- doc/guides/rel_notes/release_19_11.rst | 8 ++++- lib/librte_pci/Makefile | 2 +- lib/librte_pci/meson.build | 2 ++ lib/librte_pci/rte_pci.c | 19 ----------- lib/librte_pci/rte_pci.h | 47 -------------------------- lib/librte_pci/rte_pci_version.map | 3 -- 7 files changed, 10 insertions(+), 78 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index bbd5863664..cf7744e09e 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -38,13 +38,6 @@ Deprecation Notices have been replaced with ``rte_dev_dma_map`` and ``rte_dev_dma_unmap`` functions. The due date for the removal targets DPDK 20.02. -* 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_addr_parse`` - - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_addr_parse`` - - ``rte_eal_compare_pci_addr`` replaced by ``rte_pci_addr_cmp`` - * dpaa2: removal of ``rte_dpaa2_memsegs`` structure which has been replaced by a pa-va search library. This structure was earlier being used for holding memory segments used by dpaa2 driver for faster pa->va translation. This diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst index e3b24a57c7..97a8c7cd9d 100644 --- a/doc/guides/rel_notes/release_19_11.rst +++ b/doc/guides/rel_notes/release_19_11.rst @@ -294,6 +294,12 @@ API Changes * mem: hid the internal ``malloc_heap`` structure and the ``rte_malloc_heap.h`` header. +* pci: removed the following functions deprecated since dpdk v17.11: + + - ``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 network structure ``esp_tail`` has been prefixed by ``rte_``. * The network definitions of PPPoE ethertypes have been prefixed by ``RTE_``. @@ -404,7 +410,7 @@ The libraries prepended with a plus sign were incremented in this version. librte_meter.so.3 librte_metrics.so.1 librte_net.so.1 - librte_pci.so.1 + + librte_pci.so.2 librte_pdump.so.3 librte_pipeline.so.3 librte_pmd_bnxt.so.2 diff --git a/lib/librte_pci/Makefile b/lib/librte_pci/Makefile index 94a632670c..4c2682eadd 100644 --- a/lib/librte_pci/Makefile +++ b/lib/librte_pci/Makefile @@ -12,7 +12,7 @@ LDLIBS += -lrte_eal EXPORT_MAP := rte_pci_version.map -LIBABIVER := 1 +LIBABIVER := 2 SRCS-$(CONFIG_RTE_LIBRTE_PCI) += rte_pci.c diff --git a/lib/librte_pci/meson.build b/lib/librte_pci/meson.build index dd41cd5068..376f04ac65 100644 --- a/lib/librte_pci/meson.build +++ b/lib/librte_pci/meson.build @@ -1,5 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation +version = 2 + sources = files('rte_pci.c') headers = files('rte_pci.h') diff --git a/lib/librte_pci/rte_pci.c b/lib/librte_pci/rte_pci.c index f400178bb6..a753cf3eca 100644 --- a/lib/librte_pci/rte_pci.c +++ b/lib/librte_pci/rte_pci.c @@ -87,18 +87,6 @@ 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) @@ -109,13 +97,6 @@ rte_pci_device_name(const struct rte_pci_addr *addr, addr->devid, addr->function) >= 0); } -int -rte_eal_compare_pci_addr(const struct rte_pci_addr *addr, - const struct rte_pci_addr *addr2) -{ - return rte_pci_addr_cmp(addr, addr2); -} - int rte_pci_addr_cmp(const struct rte_pci_addr *addr, const struct rte_pci_addr *addr2) diff --git a/lib/librte_pci/rte_pci.h b/lib/librte_pci/rte_pci.h index eaa9d072cc..c87891405c 100644 --- a/lib/librte_pci/rte_pci.h +++ b/lib/librte_pci/rte_pci.h @@ -105,37 +105,6 @@ struct mapped_pci_resource { /** mapped pci device list */ TAILQ_HEAD(mapped_pci_res_list, mapped_pci_resource); -/** - * @deprecated - * 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 eal_parse_pci_BDF(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 - * 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 eal_parse_pci_DomBDF(const char *input, struct rte_pci_addr *dev_addr); - /** * 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_* @@ -151,22 +120,6 @@ int eal_parse_pci_DomBDF(const char *input, struct rte_pci_addr *dev_addr); void rte_pci_device_name(const struct rte_pci_addr *addr, char *output, size_t size); -/** - * @deprecated - * Utility function to compare two PCI device addresses. - * - * @param addr - * The PCI Bus-Device-Function address to compare - * @param addr2 - * The PCI Bus-Device-Function address to compare - * @return - * 0 on equal PCI address. - * Positive on addr is greater than addr2. - * Negative on addr is less than addr2, or error. - */ -int rte_eal_compare_pci_addr(const struct rte_pci_addr *addr, - const struct rte_pci_addr *addr2); - /** * Utility function to compare two PCI device addresses. * diff --git a/lib/librte_pci/rte_pci_version.map b/lib/librte_pci/rte_pci_version.map index c0280277bb..03790cb0f0 100644 --- a/lib/librte_pci/rte_pci_version.map +++ b/lib/librte_pci/rte_pci_version.map @@ -1,11 +1,8 @@ DPDK_17.11 { global: - eal_parse_pci_BDF; - eal_parse_pci_DomBDF; pci_map_resource; pci_unmap_resource; - rte_eal_compare_pci_addr; rte_pci_addr_cmp; rte_pci_addr_parse; rte_pci_device_name; -- 2.20.1