[dpdk-dev] [PATCH v7 02/17] lib: symbol versioning of functions in distributor
Bruce Richardson
bruce.richardson at intel.com
Fri Feb 24 15:05:44 CET 2017
On Tue, Feb 21, 2017 at 03:17:38AM +0000, David Hunt wrote:
> we will start the symbol versioning by renaming all legacy functions
>
> Signed-off-by: David Hunt <david.hunt at intel.com>
> ---
> app/test/test_distributor.c | 104 +++++++++++----------
> app/test/test_distributor_perf.c | 28 +++---
> examples/distributor/main.c | 24 ++---
> lib/librte_distributor/rte_distributor_v20.c | 54 +++++------
> lib/librte_distributor/rte_distributor_v20.h | 33 +++----
> lib/librte_distributor/rte_distributor_version.map | 18 ++--
> 6 files changed, 132 insertions(+), 129 deletions(-)
>
<snip>
> diff --git a/lib/librte_distributor/rte_distributor_version.map b/lib/librte_distributor/rte_distributor_version.map
> index 73fdc43..414fdc3 100644
> --- a/lib/librte_distributor/rte_distributor_version.map
> +++ b/lib/librte_distributor/rte_distributor_version.map
> @@ -1,15 +1,15 @@
> DPDK_2.0 {
> global:
>
> - rte_distributor_clear_returns;
> - rte_distributor_create;
> - rte_distributor_flush;
> - rte_distributor_get_pkt;
> - rte_distributor_poll_pkt;
> - rte_distributor_process;
> - rte_distributor_request_pkt;
> - rte_distributor_return_pkt;
> - rte_distributor_returned_pkts;
> + rte_distributor_clear_returns_v20;
> + rte_distributor_create_v20;
> + rte_distributor_flush_v20;
> + rte_distributor_get_pkt_v20;
> + rte_distributor_poll_pkt_v20;
> + rte_distributor_process_v20;
> + rte_distributor_request_pk_v20t;
> + rte_distributor_return_pkt_v20;
> + rte_distributor_returned_pkts_v20;
>
> local: *;
> };
> --
This looks the wrong thing to do - renaming the files in the history.
Instead, I think you need to add in aliases for the renamed versions,
thereby avoiding the need for apps, including tests and examples to
update their code to use the _v20 functions. Those _v20 suffixes should
never be externally visible.
/Bruce
More information about the dev
mailing list