[dpdk-dev] [PATCH v7 06/10] distributor: remove deprecated code

Anatoly Burakov anatoly.burakov at intel.com
Fri Nov 8 17:25:27 CET 2019


From: Marcin Baran <marcinx.baran at intel.com>

Remove code for old ABI versions ahead of ABI version bump.

Signed-off-by: Marcin Baran <marcinx.baran at intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
Acked-by: David Hunt <david.hunt at intel.com>
---

Notes:
    v5:
    - Fixed shared library linking error due to versioning still enabled
    
    v2:
    - Moved this to before ABI version bump to avoid compile breakage
    
    v2:
    - Moved this to before ABI version bump to avoid compile breakage

 lib/librte_distributor/rte_distributor.c      | 74 +++++--------------
 .../rte_distributor_v1705.h                   | 61 ---------------
 lib/librte_distributor/rte_distributor_v20.c  |  9 ---
 3 files changed, 18 insertions(+), 126 deletions(-)
 delete mode 100644 lib/librte_distributor/rte_distributor_v1705.h

diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index 2cc32ddba2..a4c8ff6a96 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -18,7 +18,6 @@
 
 #include "rte_distributor.h"
 #include "rte_distributor_v20.h"
-#include "rte_distributor_v1705.h"
 #include "distributor_private.h"
 
 TAILQ_HEAD(rte_dist_burst_list, rte_distributor);
@@ -32,8 +31,8 @@ EAL_REGISTER_TAILQ(rte_dist_burst_tailq)
 
 /**** Burst Packet APIs called by workers ****/
 
-void __vsym
-rte_distributor_request_pkt_v1705(struct rte_distributor *d,
+void
+rte_distributor_request_pkt(struct rte_distributor *d,
 		unsigned int worker_id, struct rte_mbuf **oldpkt,
 		unsigned int count)
 {
@@ -83,14 +82,9 @@ rte_distributor_request_pkt_v1705(struct rte_distributor *d,
 	__atomic_store_n(retptr64, *retptr64 | RTE_DISTRIB_GET_BUF,
 			__ATOMIC_RELEASE);
 }
-BIND_DEFAULT_SYMBOL(rte_distributor_request_pkt, _v1705, 17.05);
-MAP_STATIC_SYMBOL(void rte_distributor_request_pkt(struct rte_distributor *d,
-		unsigned int worker_id, struct rte_mbuf **oldpkt,
-		unsigned int count),
-		rte_distributor_request_pkt_v1705);
 
-int __vsym
-rte_distributor_poll_pkt_v1705(struct rte_distributor *d,
+int
+rte_distributor_poll_pkt(struct rte_distributor *d,
 		unsigned int worker_id, struct rte_mbuf **pkts)
 {
 	struct rte_distributor_buffer *buf = &d->bufs[worker_id];
@@ -129,13 +123,9 @@ rte_distributor_poll_pkt_v1705(struct rte_distributor *d,
 
 	return count;
 }
-BIND_DEFAULT_SYMBOL(rte_distributor_poll_pkt, _v1705, 17.05);
-MAP_STATIC_SYMBOL(int rte_distributor_poll_pkt(struct rte_distributor *d,
-		unsigned int worker_id, struct rte_mbuf **pkts),
-		rte_distributor_poll_pkt_v1705);
 
-int __vsym
-rte_distributor_get_pkt_v1705(struct rte_distributor *d,
+int
+rte_distributor_get_pkt(struct rte_distributor *d,
 		unsigned int worker_id, struct rte_mbuf **pkts,
 		struct rte_mbuf **oldpkt, unsigned int return_count)
 {
@@ -163,14 +153,9 @@ rte_distributor_get_pkt_v1705(struct rte_distributor *d,
 	}
 	return count;
 }
-BIND_DEFAULT_SYMBOL(rte_distributor_get_pkt, _v1705, 17.05);
-MAP_STATIC_SYMBOL(int rte_distributor_get_pkt(struct rte_distributor *d,
-		unsigned int worker_id, struct rte_mbuf **pkts,
-		struct rte_mbuf **oldpkt, unsigned int return_count),
-		rte_distributor_get_pkt_v1705);
 
-int __vsym
-rte_distributor_return_pkt_v1705(struct rte_distributor *d,
+int
+rte_distributor_return_pkt(struct rte_distributor *d,
 		unsigned int worker_id, struct rte_mbuf **oldpkt, int num)
 {
 	struct rte_distributor_buffer *buf = &d->bufs[worker_id];
@@ -202,10 +187,6 @@ rte_distributor_return_pkt_v1705(struct rte_distributor *d,
 
 	return 0;
 }
-BIND_DEFAULT_SYMBOL(rte_distributor_return_pkt, _v1705, 17.05);
-MAP_STATIC_SYMBOL(int rte_distributor_return_pkt(struct rte_distributor *d,
-		unsigned int worker_id, struct rte_mbuf **oldpkt, int num),
-		rte_distributor_return_pkt_v1705);
 
 /**** APIs called on distributor core ***/
 
@@ -359,8 +340,8 @@ release(struct rte_distributor *d, unsigned int wkr)
 
 
 /* process a set of packets to distribute them to workers */
-int __vsym
-rte_distributor_process_v1705(struct rte_distributor *d,
+int
+rte_distributor_process(struct rte_distributor *d,
 		struct rte_mbuf **mbufs, unsigned int num_mbufs)
 {
 	unsigned int next_idx = 0;
@@ -500,14 +481,10 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 
 	return num_mbufs;
 }
-BIND_DEFAULT_SYMBOL(rte_distributor_process, _v1705, 17.05);
-MAP_STATIC_SYMBOL(int rte_distributor_process(struct rte_distributor *d,
-		struct rte_mbuf **mbufs, unsigned int num_mbufs),
-		rte_distributor_process_v1705);
 
 /* return to the caller, packets returned from workers */
-int __vsym
-rte_distributor_returned_pkts_v1705(struct rte_distributor *d,
+int
+rte_distributor_returned_pkts(struct rte_distributor *d,
 		struct rte_mbuf **mbufs, unsigned int max_mbufs)
 {
 	struct rte_distributor_returned_pkts *returns = &d->returns;
@@ -532,10 +509,6 @@ rte_distributor_returned_pkts_v1705(struct rte_distributor *d,
 
 	return retval;
 }
-BIND_DEFAULT_SYMBOL(rte_distributor_returned_pkts, _v1705, 17.05);
-MAP_STATIC_SYMBOL(int rte_distributor_returned_pkts(struct rte_distributor *d,
-		struct rte_mbuf **mbufs, unsigned int max_mbufs),
-		rte_distributor_returned_pkts_v1705);
 
 /*
  * Return the number of packets in-flight in a distributor, i.e. packets
@@ -556,8 +529,8 @@ total_outstanding(const struct rte_distributor *d)
  * Flush the distributor, so that there are no outstanding packets in flight or
  * queued up.
  */
-int __vsym
-rte_distributor_flush_v1705(struct rte_distributor *d)
+int
+rte_distributor_flush(struct rte_distributor *d)
 {
 	unsigned int flushed;
 	unsigned int wkr;
@@ -586,13 +559,10 @@ rte_distributor_flush_v1705(struct rte_distributor *d)
 
 	return flushed;
 }
-BIND_DEFAULT_SYMBOL(rte_distributor_flush, _v1705, 17.05);
-MAP_STATIC_SYMBOL(int rte_distributor_flush(struct rte_distributor *d),
-		rte_distributor_flush_v1705);
 
 /* clears the internal returns array in the distributor */
-void __vsym
-rte_distributor_clear_returns_v1705(struct rte_distributor *d)
+void
+rte_distributor_clear_returns(struct rte_distributor *d)
 {
 	unsigned int wkr;
 
@@ -608,13 +578,10 @@ rte_distributor_clear_returns_v1705(struct rte_distributor *d)
 		__atomic_store_n(&(d->bufs[wkr].retptr64[0]), 0,
 				__ATOMIC_RELEASE);
 }
-BIND_DEFAULT_SYMBOL(rte_distributor_clear_returns, _v1705, 17.05);
-MAP_STATIC_SYMBOL(void rte_distributor_clear_returns(struct rte_distributor *d),
-		rte_distributor_clear_returns_v1705);
 
 /* creates a distributor instance */
-struct rte_distributor * __vsym
-rte_distributor_create_v1705(const char *name,
+struct rte_distributor *
+rte_distributor_create(const char *name,
 		unsigned int socket_id,
 		unsigned int num_workers,
 		unsigned int alg_type)
@@ -688,8 +655,3 @@ rte_distributor_create_v1705(const char *name,
 
 	return d;
 }
-BIND_DEFAULT_SYMBOL(rte_distributor_create, _v1705, 17.05);
-MAP_STATIC_SYMBOL(struct rte_distributor *rte_distributor_create(
-		const char *name, unsigned int socket_id,
-		unsigned int num_workers, unsigned int alg_type),
-		rte_distributor_create_v1705);
diff --git a/lib/librte_distributor/rte_distributor_v1705.h b/lib/librte_distributor/rte_distributor_v1705.h
deleted file mode 100644
index df4d9e8150..0000000000
--- a/lib/librte_distributor/rte_distributor_v1705.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2017 Intel Corporation
- */
-
-#ifndef _RTE_DISTRIB_V1705_H_
-#define _RTE_DISTRIB_V1705_H_
-
-/**
- * @file
- * RTE distributor
- *
- * The distributor is a component which is designed to pass packets
- * one-at-a-time to workers, with dynamic load balancing.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct rte_distributor *
-rte_distributor_create_v1705(const char *name, unsigned int socket_id,
-		unsigned int num_workers,
-		unsigned int alg_type);
-
-int
-rte_distributor_process_v1705(struct rte_distributor *d,
-		struct rte_mbuf **mbufs, unsigned int num_mbufs);
-
-int
-rte_distributor_returned_pkts_v1705(struct rte_distributor *d,
-		struct rte_mbuf **mbufs, unsigned int max_mbufs);
-
-int
-rte_distributor_flush_v1705(struct rte_distributor *d);
-
-void
-rte_distributor_clear_returns_v1705(struct rte_distributor *d);
-
-int
-rte_distributor_get_pkt_v1705(struct rte_distributor *d,
-	unsigned int worker_id, struct rte_mbuf **pkts,
-	struct rte_mbuf **oldpkt, unsigned int retcount);
-
-int
-rte_distributor_return_pkt_v1705(struct rte_distributor *d,
-	unsigned int worker_id, struct rte_mbuf **oldpkt, int num);
-
-void
-rte_distributor_request_pkt_v1705(struct rte_distributor *d,
-		unsigned int worker_id, struct rte_mbuf **oldpkt,
-		unsigned int count);
-
-int
-rte_distributor_poll_pkt_v1705(struct rte_distributor *d,
-		unsigned int worker_id, struct rte_mbuf **mbufs);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/lib/librte_distributor/rte_distributor_v20.c b/lib/librte_distributor/rte_distributor_v20.c
index 7a6fddf556..655944bdb3 100644
--- a/lib/librte_distributor/rte_distributor_v20.c
+++ b/lib/librte_distributor/rte_distributor_v20.c
@@ -41,7 +41,6 @@ rte_distributor_request_pkt_v20(struct rte_distributor_v20 *d,
 	/* Sync with distributor on GET_BUF flag. */
 	__atomic_store_n(&(buf->bufptr64), req, __ATOMIC_RELEASE);
 }
-VERSION_SYMBOL(rte_distributor_request_pkt, _v20, 2.0);
 
 struct rte_mbuf * __vsym
 rte_distributor_poll_pkt_v20(struct rte_distributor_v20 *d,
@@ -57,7 +56,6 @@ rte_distributor_poll_pkt_v20(struct rte_distributor_v20 *d,
 	int64_t ret = buf->bufptr64 >> RTE_DISTRIB_FLAG_BITS;
 	return (struct rte_mbuf *)((uintptr_t)ret);
 }
-VERSION_SYMBOL(rte_distributor_poll_pkt, _v20, 2.0);
 
 struct rte_mbuf * __vsym
 rte_distributor_get_pkt_v20(struct rte_distributor_v20 *d,
@@ -69,7 +67,6 @@ rte_distributor_get_pkt_v20(struct rte_distributor_v20 *d,
 		rte_pause();
 	return ret;
 }
-VERSION_SYMBOL(rte_distributor_get_pkt, _v20, 2.0);
 
 int __vsym
 rte_distributor_return_pkt_v20(struct rte_distributor_v20 *d,
@@ -82,7 +79,6 @@ rte_distributor_return_pkt_v20(struct rte_distributor_v20 *d,
 	__atomic_store_n(&(buf->bufptr64), req, __ATOMIC_RELEASE);
 	return 0;
 }
-VERSION_SYMBOL(rte_distributor_return_pkt, _v20, 2.0);
 
 /**** APIs called on distributor core ***/
 
@@ -318,7 +314,6 @@ rte_distributor_process_v20(struct rte_distributor_v20 *d,
 	d->returns.count = ret_count;
 	return num_mbufs;
 }
-VERSION_SYMBOL(rte_distributor_process, _v20, 2.0);
 
 /* return to the caller, packets returned from workers */
 int __vsym
@@ -339,7 +334,6 @@ rte_distributor_returned_pkts_v20(struct rte_distributor_v20 *d,
 
 	return retval;
 }
-VERSION_SYMBOL(rte_distributor_returned_pkts, _v20, 2.0);
 
 /* return the number of packets in-flight in a distributor, i.e. packets
  * being worked on or queued up in a backlog.
@@ -369,7 +363,6 @@ rte_distributor_flush_v20(struct rte_distributor_v20 *d)
 
 	return flushed;
 }
-VERSION_SYMBOL(rte_distributor_flush, _v20, 2.0);
 
 /* clears the internal returns array in the distributor */
 void __vsym
@@ -380,7 +373,6 @@ rte_distributor_clear_returns_v20(struct rte_distributor_v20 *d)
 	memset(d->returns.mbufs, 0, sizeof(d->returns.mbufs));
 #endif
 }
-VERSION_SYMBOL(rte_distributor_clear_returns, _v20, 2.0);
 
 /* creates a distributor instance */
 struct rte_distributor_v20 * __vsym
@@ -424,4 +416,3 @@ rte_distributor_create_v20(const char *name,
 
 	return d;
 }
-VERSION_SYMBOL(rte_distributor_create, _v20, 2.0);
-- 
2.17.1


More information about the dev mailing list