From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id D37494CE4 for ; Wed, 1 Mar 2017 15:47:19 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Mar 2017 06:47:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,226,1484035200"; d="scan'208";a="1117076542" Received: from silpixa00397515.ir.intel.com (HELO silpixa00397515.ger.corp.intel.com) ([10.237.223.14]) by fmsmga001.fm.intel.com with ESMTP; 01 Mar 2017 06:47:17 -0800 From: David Hunt To: dev@dpdk.org Cc: bruce.richardson@intel.com, David Hunt Date: Wed, 1 Mar 2017 07:47:26 +0000 Message-Id: <1488354455-142764-10-git-send-email-david.hunt@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488354455-142764-1-git-send-email-david.hunt@intel.com> References: <1487647073-129064-2-git-send-email-david.hunt@intel.com> <1488354455-142764-1-git-send-email-david.hunt@intel.com> Subject: [dpdk-dev] [PATCH v8 09/18] lib: add symbol versioning to distributor 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: , X-List-Received-Date: Wed, 01 Mar 2017 14:47:20 -0000 Also bumped up the ABI version number in the Makefile Signed-off-by: David Hunt --- lib/librte_distributor/Makefile | 2 +- lib/librte_distributor/rte_distributor.c | 8 ++++++++ lib/librte_distributor/rte_distributor_v20.c | 10 ++++++++++ lib/librte_distributor/rte_distributor_version.map | 14 ++++++++++++++ 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/lib/librte_distributor/Makefile b/lib/librte_distributor/Makefile index 2b28eff..2f05cf3 100644 --- a/lib/librte_distributor/Makefile +++ b/lib/librte_distributor/Makefile @@ -39,7 +39,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) EXPORT_MAP := rte_distributor_version.map -LIBABIVER := 1 +LIBABIVER := 2 # all source are stored in SRCS-y SRCS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) := rte_distributor_v20.c diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c index 6e1debf..2c5511d 100644 --- a/lib/librte_distributor/rte_distributor.c +++ b/lib/librte_distributor/rte_distributor.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -168,6 +169,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, @@ -197,6 +199,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 ***/ @@ -476,6 +479,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 @@ -504,6 +508,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 @@ -549,6 +554,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 @@ -565,6 +571,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 * @@ -638,3 +645,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..bb6c5d7 100644 --- a/lib/librte_distributor/rte_distributor_v20.c +++ b/lib/librte_distributor/rte_distributor_v20.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include "rte_distributor_v20.h" @@ -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 73fdc43..3a285b3 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; -- 2.7.4