From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 55EB6A0093; Tue, 19 May 2020 15:26:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1FE781D990; Tue, 19 May 2020 15:26:34 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 732E01D98F; Tue, 19 May 2020 15:26:31 +0200 (CEST) IronPort-SDR: 04YudfR415RNmy868Ec0awsKEp4NwlqUmOJI4uL9pE1jmmy5Zf9ES9VaD/FT63GdBcuqcVufnt 3EYMPpKHXHow== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2020 06:26:30 -0700 IronPort-SDR: any0aV2T9PxIc/Q5WxblwlnUCG1fghWceCKoT4IRYNe+2y1QsN2Fpow7cmB4JBeT0b5sTfc5sZ Asw1V0UUeYdw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,410,1583222400"; d="scan'208";a="411632107" Received: from orsmsx108.amr.corp.intel.com ([10.22.240.6]) by orsmga004.jf.intel.com with ESMTP; 19 May 2020 06:26:30 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX108.amr.corp.intel.com (10.22.240.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 19 May 2020 06:26:30 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 19 May 2020 06:26:29 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 19 May 2020 06:26:29 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.108) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 19 May 2020 06:26:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HaDfDmsF96yHe9fswgGrisw2L/ltwHBsJenl0Rh6Lp+w+SpUJwZv7yPtwfNlMVMpdXAsFylI5qnJYmXzUTPwVSmleh3+3kd7kYv2AewMobq0fyPgNAr48EM39pmWw8O0fCXEDst2U9Nfz24lveGDnsblWrB9iOgi1DtJd2y80Wku7xHagHHuYbqj9HttQ9aWvl/zOrmFegsDxuKyv76BZfzQbVnV+VmPQdzNde51S0w8QzGcmcBT8xRGKLigZ5Jr/8oZj86m8AvZaveTXFbsUuZaXXuKg0FPX6+W4KSGlWOvlEp1p8eQO2ulHzxyUYNJq+rOXYDjIJ35Y+4E5qhQLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MnfWoGMbWUzI658DPWWQFiJ+EjzSIlC3+3g7aJjwsJE=; b=C6F3R9S6KYrlyv5gAqSftn+BbWXB1Cs3EVZaBsaSa9dAi/lqmuV+z7i+JzUl70p9wZ1Ppu0kO5X2UIgEg+vbTAGQs3L1yX7ti+YsWHzqV88tGNgcVVABtQXGiHb43jCu1ohSfnOjSd4XTmkqxmITBv2SLxvJeCZkClh756hWuernNYlWd11ZTFNNg86NAfFw34ZH9oxDGGtM5HV/d1XL7COepVrnZmfuRnOHgWbTAbgjWQj5vNRvFnNIZxMIRUfTm1bYG7so9hLKbWsa+MF/jiSIuQxYAbPjLcHZ15FVuxUs4krZUTtE6cCAWK+pCGEfMQbeNV4xjMpoMTBdfLFEiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MnfWoGMbWUzI658DPWWQFiJ+EjzSIlC3+3g7aJjwsJE=; b=uGYttDBBoWq6StrIsP+4f+FcjRHV/pva74VqhWrFMELfa5Xh745oFO9rJOETTdVSPY9HOhWP+2WErlafFCzLIoZEJl1ZWRSSdfo2jcGxfmg61FMgUkUKX5KL9ZbvQpDdzJLNcVooETR1MG6aIS/abnkXbNKh/bhJp3rynACzJOM= Received: from BYAPR11MB2935.namprd11.prod.outlook.com (2603:10b6:a03:82::24) by BYAPR11MB3238.namprd11.prod.outlook.com (2603:10b6:a03:7e::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.27; Tue, 19 May 2020 13:26:26 +0000 Received: from BYAPR11MB2935.namprd11.prod.outlook.com ([fe80::30cf:b71:6d62:7fd9]) by BYAPR11MB2935.namprd11.prod.outlook.com ([fe80::30cf:b71:6d62:7fd9%4]) with mapi id 15.20.3000.034; Tue, 19 May 2020 13:26:26 +0000 From: "Dumitrescu, Cristian" To: "Yigit, Ferruh" , Ray Kinsella , Neil Horman , Eelco Chaudron CC: "dev@dpdk.org" , Thomas Monjalon , David Marchand , "stable@dpdk.org" , Luca Boccassi , "Richardson, Bruce" , "Stokes, Ian" , "Andrzej Ostruszka" , "techboard@dpdl.org" Thread-Topic: [PATCH v6] meter: provide experimental alias of API for old apps Thread-Index: AQHWLddlcFAe2eFJXkSvMKNpPUu44aivY76Q Date: Tue, 19 May 2020 13:26:26 +0000 Message-ID: References: <20200513121149.2283385-1-ferruh.yigit@intel.com> <20200519121629.3590459-1-ferruh.yigit@intel.com> In-Reply-To: <20200519121629.3590459-1-ferruh.yigit@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.151.171] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 04a9ee22-e76c-4c94-2f97-08d7fbf83b5e x-ms-traffictypediagnostic: BYAPR11MB3238: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:580; x-forefront-prvs: 040866B734 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: cufJAQ4nBrgKCxYrMoBXRAm/S6e+U0iCTiQB6Dg0jGFx4Jq9Ftl+JDrGrGTkD/HBUA9Os9hcj6i/1kD0OhhQWW3IG58uBvYaEvXUAy3qc4c5BLlTPWZTVfVzOE2Fgdr3app0CVyiyF0Wth5tPBIv5hRWrAA+V7jPOJkHoOD/nz+yiiff5ifpnVT46vQOhFLrbrCnehvOMESbPxtcAPgd4M3ZRBBdYp5fdEabXq3p5lehI9a3sP6TTLsrZjFj5u4wFP8t7FBQIocwCnBx/wY93mHvIdKCMXQt2PPzyqixVgQtpZG8F/AQqNAV3UDC2NVbeLEfe2kbInUuY1oTzQA+iOe05g24yw2vSMuFE3MbDpiJ4hboukRp/HrYvbJgOaEwKNk0/cKARZ2ERp155GXZ3iT7jurdowVKsmjkFrMDj0GPMgfNcpPSP49cTEZ4NC2S x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2935.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(346002)(136003)(396003)(376002)(39860400002)(366004)(4326008)(76116006)(52536014)(66446008)(66556008)(66476007)(64756008)(66946007)(186003)(26005)(54906003)(316002)(110136005)(6506007)(53546011)(55016002)(7416002)(7696005)(71200400001)(86362001)(2906002)(9686003)(8936002)(5660300002)(478600001)(33656002)(8676002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: WDjCzUPE9Kps9JcKlKCJOsle1nncPWbtUrL5G5R4nHRC/nvxupuaDDA/KH19zoEi6LWbEI1j1JXYhzelu1g9GkoWsIRxMpAHqOESczFtU5JGYvNQH0UkLq2NEaqSXZ7PuF3WVH9zSOUhbpc7LtDGzx6p9tMYnuicGUip7FjFWGNdbcYFyX6MlGzh+KvMjXYLjvA2jHKbLnr9h4jXMxLYnCOr4TYJlWMSpWfMmIIDleCUUnFDTHCPhBfgtLo602a60rXtQcWmwSFL0iR23rgAnoIJHwdsWvR00Fs3bRYu94NxyU8pJOyT1yLTZf8+WL/IN6zVdvbiDwng9JRWNaA8dkfu72mqGVVDvmdHBWb/F5pcmcsPQ/TeiTmbVOom23R2T1BGOEr1pu+JvcvkOc06jUPIt7LZZQ23x3EzVQ25yGZJP4r3jw7dfU7Gc52++m+6JhMChflcRqW/Bj+cX58nRWbV4rNgn+KKj0XUqnKS09dv4I8gKVYOjwQjpQfcsUub Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 04a9ee22-e76c-4c94-2f97-08d7fbf83b5e X-MS-Exchange-CrossTenant-originalarrivaltime: 19 May 2020 13:26:26.0825 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 8DYDxitHcBO9mFVl9mr5MEtFt8cj6RbewZyMWftQS0lbfMzhcdEvk9ytKIydDzo61ks+8P+/V3twWquRAbWSId9DzY5vxh7+/3WheZq/vFY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3238 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v6] meter: provide experimental alias of API for old apps 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" > -----Original Message----- > From: Yigit, Ferruh > Sent: Tuesday, May 19, 2020 1:16 PM > To: Dumitrescu, Cristian ; Ray Kinsella > ; Neil Horman ; Eelco > Chaudron > Cc: dev@dpdk.org; Yigit, Ferruh ; Thomas Monjalon > ; David Marchand ; > stable@dpdk.org; Luca Boccassi ; Richardson, Bruce > ; Stokes, Ian ; Andrzej > Ostruszka > Subject: [PATCH v6] meter: provide experimental alias of API for old apps >=20 > On v20.02 some meter APIs have been matured and symbols moved from > EXPERIMENTAL to DPDK_20.0.1 block. >=20 > 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. >=20 > This patch provides aliasing by duplicating the existing and versioned > symbols as experimental. >=20 > Since symbols moved from DPDK_20.0.1 to DPDK_21 block in the v20.05, the > aliasing done between EXPERIMENTAL and DPDK_21. >=20 > With DPDK_21 ABI (DPDK v20.11) all aliasing will be removed and only > stable version of the APIs will remain. >=20 > Fixes: 30512af820fe ("meter: remove experimental flag from RFC4115 trTCM > API") > Cc: stable@dpdk.org >=20 > Signed-off-by: Ferruh Yigit > --- > Cc: Neil Horman > Cc: Thomas Monjalon > Cc: Luca Boccassi > Cc: David Marchand > Cc: Bruce Richardson > Cc: Ian Stokes > Cc: Eelco Chaudron > Cc: Andrzej Ostruszka > Cc: Ray Kinsella > Cc: cristian.dumitrescu@intel.com >=20 > v2: > * Commit log updated >=20 > v3: > * added suggested comment to VERSION_SYMBOL_EXPERIMENTAL macro >=20 > v4: > * update script name in commit log, remove empty line >=20 > v5: > * Patch has only meter library changes > * Aliasing moved into rte_meter_compat.c >=20 > 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(-) >=20 > 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 @@ >=20 > sources =3D files('rte_meter.c') > headers =3D files('rte_meter.h') > +use_function_versioning =3D 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 > #include > #include > +#include >=20 > #include "rte_meter.h" >=20 > @@ -119,8 +120,15 @@ rte_meter_trtcm_config(struct rte_meter_trtcm > *m, > return 0; > } >=20 > -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 bac= k > 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( > } >=20 > 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_conf > ig, _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( >=20 > 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 Acked-by: Cristian Dumitrescu Thanks, Ferruh and Ray! I am OK to let this is temporarily until release 20.11. Regarding the API breakage larger problem, this method only fixes the case= of experimental APIs transitioning to non-experimental status with no modi= fications, but it does not handle the following possible cases: 1. Experimental APIs transitioning to non-experimental status with some mo= difications. 2. Experimental APIs being removed. 3. Non-experimental APIs transitioning to deprecated status. We need a clear procedure & timing for all these cases to avoid similar sit= uations in the future. Likely a good topic for techboard discussion.