From patchwork Tue Feb 21 03:17:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hunt, David" X-Patchwork-Id: 20630 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 75B41D59A; Tue, 21 Feb 2017 11:17:51 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id E5F795911 for ; Tue, 21 Feb 2017 11:17:24 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Feb 2017 02:17:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,189,1484035200"; d="scan'208";a="227857060" Received: from silpixa00397515.ir.intel.com (HELO silpixa00397515.ger.corp.intel.com) ([10.237.223.14]) by fmsmga004.fm.intel.com with ESMTP; 21 Feb 2017 02:17:22 -0800 From: David Hunt To: dev@dpdk.org Cc: bruce.richardson@intel.com, David Hunt Date: Tue, 21 Feb 2017 03:17:43 +0000 Message-Id: <1487647073-129064-8-git-send-email-david.hunt@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1487647073-129064-1-git-send-email-david.hunt@intel.com> References: <1485163480-156507-2-git-send-email-david.hunt@intel.com> <1487647073-129064-1-git-send-email-david.hunt@intel.com> Subject: [dpdk-dev] [PATCH v7 07/17] lib: apply symbol versioning to distibutor lib X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Note: LIBABIVER is also bumped up in the Makefile Signed-off-by: David Hunt --- lib/librte_distributor/rte_distributor.c | 10 +++++++++- lib/librte_distributor/rte_distributor_v20.c | 10 ++++++++++ lib/librte_distributor/rte_distributor_version.map | 14 ++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c index b8e171c..2dc7738 100644 --- a/lib/librte_distributor/rte_distributor.c +++ b/lib/librte_distributor/rte_distributor.c @@ -43,7 +43,6 @@ #include #include "rte_distributor_private.h" #include "rte_distributor.h" -#include "rte_distributor_v1705.h" #include "rte_distributor_v20.h" TAILQ_HEAD(rte_dist_burst_list, rte_distributor); @@ -103,6 +102,7 @@ rte_distributor_request_pkt(struct rte_distributor *d, */ *retptr64 |= RTE_DISTRIB_GET_BUF; } +BIND_DEFAULT_SYMBOL(rte_distributor_request_pkt,, 17.05); int rte_distributor_poll_pkt(struct rte_distributor *d, @@ -139,6 +139,7 @@ rte_distributor_poll_pkt(struct rte_distributor *d, return count; } +BIND_DEFAULT_SYMBOL(rte_distributor_poll_pkt,, 17.05); int rte_distributor_get_pkt(struct rte_distributor *d, @@ -169,6 +170,7 @@ rte_distributor_get_pkt(struct rte_distributor *d, } return count; } +BIND_DEFAULT_SYMBOL(rte_distributor_get_pkt,, 17.05); int rte_distributor_return_pkt(struct rte_distributor *d, @@ -198,6 +200,7 @@ rte_distributor_return_pkt(struct rte_distributor *d, return 0; } +BIND_DEFAULT_SYMBOL(rte_distributor_return_pkt,, 17.05); /**** APIs called on distributor core ***/ @@ -477,6 +480,7 @@ rte_distributor_process(struct rte_distributor *d, return num_mbufs; } +BIND_DEFAULT_SYMBOL(rte_distributor_process,, 17.05); /* return to the caller, packets returned from workers */ int @@ -505,6 +509,7 @@ rte_distributor_returned_pkts(struct rte_distributor *d, return retval; } +BIND_DEFAULT_SYMBOL(rte_distributor_returned_pkts,, 17.05); /* * Return the number of packets in-flight in a distributor, i.e. packets @@ -550,6 +555,7 @@ rte_distributor_flush(struct rte_distributor *d) return flushed; } +BIND_DEFAULT_SYMBOL(rte_distributor_flush,, 17.05); /* clears the internal returns array in the distributor */ void @@ -566,6 +572,7 @@ rte_distributor_clear_returns(struct rte_distributor *d) for (wkr = 0; wkr < d->num_workers; wkr++) d->bufs[wkr].retptr64[0] = 0; } +BIND_DEFAULT_SYMBOL(rte_distributor_clear_returns,, 17.05); /* creates a distributor instance */ struct rte_distributor * @@ -639,3 +646,4 @@ rte_distributor_create(const char *name, return d; } +BIND_DEFAULT_SYMBOL(rte_distributor_create,, 17.05); diff --git a/lib/librte_distributor/rte_distributor_v20.c b/lib/librte_distributor/rte_distributor_v20.c index 1f406c5..d74a789 100644 --- a/lib/librte_distributor/rte_distributor_v20.c +++ b/lib/librte_distributor/rte_distributor_v20.c @@ -42,6 +42,7 @@ #include #include "rte_distributor_v20.h" #include "rte_distributor_private.h" +#include "rte_compat.h" TAILQ_HEAD(rte_distributor_list, rte_distributor_v20); @@ -63,6 +64,7 @@ rte_distributor_request_pkt_v20(struct rte_distributor_v20 *d, rte_pause(); buf->bufptr64 = req; } +VERSION_SYMBOL(rte_distributor_request_pkt, _v20, 2.0); struct rte_mbuf * rte_distributor_poll_pkt_v20(struct rte_distributor_v20 *d, @@ -76,6 +78,7 @@ 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 * rte_distributor_get_pkt_v20(struct rte_distributor_v20 *d, @@ -87,6 +90,7 @@ rte_distributor_get_pkt_v20(struct rte_distributor_v20 *d, rte_pause(); return ret; } +VERSION_SYMBOL(rte_distributor_get_pkt, _v20, 2.0); int rte_distributor_return_pkt_v20(struct rte_distributor_v20 *d, @@ -98,6 +102,7 @@ rte_distributor_return_pkt_v20(struct rte_distributor_v20 *d, buf->bufptr64 = req; return 0; } +VERSION_SYMBOL(rte_distributor_return_pkt, _v20, 2.0); /**** APIs called on distributor core ***/ @@ -314,6 +319,7 @@ 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 @@ -334,6 +340,7 @@ 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 workered on or queued up in a backlog. */ @@ -362,6 +369,7 @@ 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 @@ -372,6 +380,7 @@ 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 * @@ -415,3 +424,4 @@ rte_distributor_create_v20(const char *name, return d; } +VERSION_SYMBOL(rte_distributor_create, _v20, 2.0); diff --git a/lib/librte_distributor/rte_distributor_version.map b/lib/librte_distributor/rte_distributor_version.map index 414fdc3..7531cbe 100644 --- a/lib/librte_distributor/rte_distributor_version.map +++ b/lib/librte_distributor/rte_distributor_version.map @@ -13,3 +13,17 @@ DPDK_2.0 { local: *; }; + +DPDK_17.05 { + 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; +} DPDK_2.0;