patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
	Ray Kinsella <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com>,
	Eelco Chaudron <echaudro@redhat.com>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	David Marchand <david.marchand@redhat.com>,
	stable@dpdk.org, Luca Boccassi <bluca@debian.org>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Ian Stokes <ian.stokes@intel.com>,
	Andrzej Ostruszka <amo@semihalf.com>
Subject: [dpdk-stable] [PATCH v6] meter: provide experimental alias of API for old apps
Date: Tue, 19 May 2020 13:16:29 +0100	[thread overview]
Message-ID: <20200519121629.3590459-1-ferruh.yigit@intel.com> (raw)
In-Reply-To: <20200513121149.2283385-1-ferruh.yigit@intel.com>

On v20.02 some meter APIs have been matured and symbols moved from
EXPERIMENTAL to DPDK_20.0.1 block.

This can break the applications that were using these mentioned APIs on
v19.11. Although there is no modification on the APIs and the action is
positive and matures the APIs, the affect can be negative to
applications.

This patch provides aliasing by duplicating the existing and versioned
symbols as experimental.

Since symbols moved from DPDK_20.0.1 to DPDK_21 block in the v20.05, the
aliasing done between EXPERIMENTAL and DPDK_21.

With DPDK_21 ABI (DPDK v20.11) all aliasing will be removed and only
stable version of the APIs will remain.

Fixes: 30512af820fe ("meter: remove experimental flag from RFC4115 trTCM API")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Thomas Monjalon <thomas@monjalon.net>
Cc: Luca Boccassi <bluca@debian.org>
Cc: David Marchand <david.marchand@redhat.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>
Cc: Ian Stokes <ian.stokes@intel.com>
Cc: Eelco Chaudron <echaudro@redhat.com>
Cc: Andrzej Ostruszka <amo@semihalf.com>
Cc: Ray Kinsella <mdr@ashroe.eu>
Cc: cristian.dumitrescu@intel.com

v2:
* Commit log updated

v3:
* added suggested comment to VERSION_SYMBOL_EXPERIMENTAL macro

v4:
* update script name in commit log, remove empty line

v5:
* Patch has only meter library changes
* Aliasing moved into rte_meter_compat.c

v6:
* Move aliasing back to rte_meter.c
* Rename static function to have '__' prefix
* Add comment to alias code
---
 lib/librte_meter/meson.build           |  1 +
 lib/librte_meter/rte_meter.c           | 73 ++++++++++++++++++++++++--
 lib/librte_meter/rte_meter_version.map |  8 +++
 3 files changed, 79 insertions(+), 3 deletions(-)

diff --git a/lib/librte_meter/meson.build b/lib/librte_meter/meson.build
index 646fd4d43f..fce0368437 100644
--- a/lib/librte_meter/meson.build
+++ b/lib/librte_meter/meson.build
@@ -3,3 +3,4 @@
 
 sources = files('rte_meter.c')
 headers = files('rte_meter.h')
+use_function_versioning = true
diff --git a/lib/librte_meter/rte_meter.c b/lib/librte_meter/rte_meter.c
index da01429a8b..149cf58bdd 100644
--- a/lib/librte_meter/rte_meter.c
+++ b/lib/librte_meter/rte_meter.c
@@ -9,6 +9,7 @@
 #include <rte_common.h>
 #include <rte_log.h>
 #include <rte_cycles.h>
+#include <rte_function_versioning.h>
 
 #include "rte_meter.h"
 
@@ -119,8 +120,15 @@ rte_meter_trtcm_config(struct rte_meter_trtcm *m,
 	return 0;
 }
 
-int
-rte_meter_trtcm_rfc4115_profile_config(
+/*
+ *  ABI aliasing done for 'rte_meter_trtcm_rfc4115_profile_config'
+ *  to support both EXPERIMENTAL and DPDK_21 versions
+ *  This versioning will be removed on next ABI version (v20.11)
+ *  and '__rte_meter_trtcm_rfc4115_profile_config' will be restrored back to
+ *  'rte_meter_trtcm_rfc4115_profile_config' without versioning.
+ */
+static int
+__rte_meter_trtcm_rfc4115_profile_config(
 	struct rte_meter_trtcm_rfc4115_profile *p,
 	struct rte_meter_trtcm_rfc4115_params *params)
 {
@@ -145,7 +153,42 @@ rte_meter_trtcm_rfc4115_profile_config(
 }
 
 int
-rte_meter_trtcm_rfc4115_config(
+rte_meter_trtcm_rfc4115_profile_config_s(
+	struct rte_meter_trtcm_rfc4115_profile *p,
+	struct rte_meter_trtcm_rfc4115_params *params);
+int
+rte_meter_trtcm_rfc4115_profile_config_s(
+	struct rte_meter_trtcm_rfc4115_profile *p,
+	struct rte_meter_trtcm_rfc4115_params *params)
+{
+	return __rte_meter_trtcm_rfc4115_profile_config(p, params);
+}
+BIND_DEFAULT_SYMBOL(rte_meter_trtcm_rfc4115_profile_config, _s, 21);
+MAP_STATIC_SYMBOL(int rte_meter_trtcm_rfc4115_profile_config(struct rte_meter_trtcm_rfc4115_profile *p,
+		struct rte_meter_trtcm_rfc4115_params *params), rte_meter_trtcm_rfc4115_profile_config_s);
+
+int
+rte_meter_trtcm_rfc4115_profile_config_e(
+	struct rte_meter_trtcm_rfc4115_profile *p,
+	struct rte_meter_trtcm_rfc4115_params *params);
+int
+rte_meter_trtcm_rfc4115_profile_config_e(
+	struct rte_meter_trtcm_rfc4115_profile *p,
+	struct rte_meter_trtcm_rfc4115_params *params)
+{
+	return __rte_meter_trtcm_rfc4115_profile_config(p, params);
+}
+VERSION_SYMBOL_EXPERIMENTAL(rte_meter_trtcm_rfc4115_profile_config, _e);
+
+/*
+ *  ABI aliasing done for 'rte_meter_trtcm_rfc4115_config'
+ *  to support both EXPERIMENTAL and DPDK_21 versions
+ *  This versioning will be removed on next ABI version (v20.11)
+ *  and '__rte_meter_trtcm_rfc4115_config' will be restrored back to
+ *  'rte_meter_trtcm_rfc4115_config' without versioning.
+ */
+static int
+__rte_meter_trtcm_rfc4115_config(
 	struct rte_meter_trtcm_rfc4115 *m,
 	struct rte_meter_trtcm_rfc4115_profile *p)
 {
@@ -160,3 +203,27 @@ rte_meter_trtcm_rfc4115_config(
 
 	return 0;
 }
+
+int
+rte_meter_trtcm_rfc4115_config_s(struct rte_meter_trtcm_rfc4115 *m,
+	struct rte_meter_trtcm_rfc4115_profile *p);
+int
+rte_meter_trtcm_rfc4115_config_s(struct rte_meter_trtcm_rfc4115 *m,
+	struct rte_meter_trtcm_rfc4115_profile *p)
+{
+	return __rte_meter_trtcm_rfc4115_config(m, p);
+}
+BIND_DEFAULT_SYMBOL(rte_meter_trtcm_rfc4115_config, _s, 21);
+MAP_STATIC_SYMBOL(int rte_meter_trtcm_rfc4115_config(struct rte_meter_trtcm_rfc4115 *m,
+		 struct rte_meter_trtcm_rfc4115_profile *p), rte_meter_trtcm_rfc4115_config_s);
+
+int
+rte_meter_trtcm_rfc4115_config_e(struct rte_meter_trtcm_rfc4115 *m,
+	struct rte_meter_trtcm_rfc4115_profile *p);
+int
+rte_meter_trtcm_rfc4115_config_e(struct rte_meter_trtcm_rfc4115 *m,
+	struct rte_meter_trtcm_rfc4115_profile *p)
+{
+	return __rte_meter_trtcm_rfc4115_config(m, p);
+}
+VERSION_SYMBOL_EXPERIMENTAL(rte_meter_trtcm_rfc4115_config, _e);
diff --git a/lib/librte_meter/rte_meter_version.map b/lib/librte_meter/rte_meter_version.map
index 2c7dadbcac..b493bcebe9 100644
--- a/lib/librte_meter/rte_meter_version.map
+++ b/lib/librte_meter/rte_meter_version.map
@@ -20,4 +20,12 @@ DPDK_21 {
 	rte_meter_trtcm_rfc4115_color_blind_check;
 	rte_meter_trtcm_rfc4115_config;
 	rte_meter_trtcm_rfc4115_profile_config;
+
 } DPDK_20.0;
+
+EXPERIMENTAL {
+       global:
+
+	rte_meter_trtcm_rfc4115_config;
+	rte_meter_trtcm_rfc4115_profile_config;
+};
-- 
2.25.4


  parent reply	other threads:[~2020-05-19 12:16 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200513121149.2283385-1-ferruh.yigit@intel.com>
2020-05-13 18:05 ` [dpdk-stable] [PATCH v2] " Ferruh Yigit
2020-05-14  8:44   ` Ray Kinsella
2020-05-14 11:53     ` Ferruh Yigit
2020-05-14 11:52 ` [dpdk-stable] [PATCH v3] " Ferruh Yigit
2020-05-14 15:10   ` Ray Kinsella
2020-05-14 15:32   ` David Marchand
2020-05-14 15:56     ` Ray Kinsella
2020-05-14 16:07     ` Ferruh Yigit
2020-05-14 16:30       ` David Marchand
2020-05-14 16:11 ` [dpdk-stable] [PATCH v4] " Ferruh Yigit
2020-05-15 13:31   ` Thomas Monjalon
2020-05-15 14:41     ` Ray Kinsella
2020-05-15 15:03     ` Ray Kinsella
2020-05-15 14:36   ` [dpdk-stable] [dpdk-dev] " Ray Kinsella
2020-05-15 15:01   ` Ray Kinsella
2020-05-17 19:52   ` [dpdk-stable] " Dumitrescu, Cristian
2020-05-18  6:29     ` Ray Kinsella
2020-05-18  9:22       ` Thomas Monjalon
2020-05-18  9:30         ` Ray Kinsella
2020-05-18 10:46           ` Thomas Monjalon
2020-05-18 11:18             ` Dumitrescu, Cristian
2020-05-18 11:49               ` Ray Kinsella
2020-05-18 11:48             ` Ray Kinsella
2020-05-18 12:13               ` Thomas Monjalon
2020-05-18 13:06                 ` Ray Kinsella
2020-05-18 18:30 ` [dpdk-stable] [PATCH v5] " Ferruh Yigit
2020-05-19 12:16 ` Ferruh Yigit [this message]
2020-05-19 13:26   ` [dpdk-stable] [PATCH v6] " Dumitrescu, Cristian
2020-05-19 14:24     ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2020-05-19 14:22   ` [dpdk-stable] " Ray Kinsella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200519121629.3590459-1-ferruh.yigit@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=amo@semihalf.com \
    --cc=bluca@debian.org \
    --cc=bruce.richardson@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=echaudro@redhat.com \
    --cc=ian.stokes@intel.com \
    --cc=mdr@ashroe.eu \
    --cc=nhorman@tuxdriver.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).