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 53D81A04C1; Wed, 20 Nov 2019 18:31:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 96CC91B93E; Wed, 20 Nov 2019 18:31:26 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id BEA1627D for ; Wed, 20 Nov 2019 13:10:29 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Nov 2019 04:10:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,221,1571727600"; d="scan'208";a="209513004" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 20 Nov 2019 04:10:28 -0800 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 20 Nov 2019 04:10:28 -0800 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 20 Nov 2019 04:10:28 -0800 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.51) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 20 Nov 2019 04:10:28 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hhYGYRCKAODQq5qoX9z2JvO1r4s/Czu7+D6YthZGTif0+XeYYLO2VZShLmPE9JPLa1MLHVno8sFY7rnWM4UQFVPP5Y/bSw80aGpnbNIG67Uhv2WYpLOGed1cIQi5FALNemI6h1ge4tw+KTeCDMGpjzPtamc29zeaw1EOrvb7a8PKSmpYJD2EL87kVUnq2HppLUIt4wivLaAhrwAs2Dm13nQqWNn55HoCZKn7WnX8axI7Q9UmY0LQ6jCqwQIRKS5gpj2W7eNX3e171oFKLe1obXqt5w9jRQt4jqPsiEWGgIWnohvoP99ufpGCL4yX6EqfEEm9+53HB+B3UEHvKrIztA== 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=QxsV9lRsVPSEZ6bA3gzml966qcYRbzem47p0hRFjfjg=; b=csEXCHCUezwKzZS+LYla8lEHWnQxmfJyha/FqwP/XH5SyCalWRpU+x0NJnQfywUzEMSufo5bz2G0g9KwDTSMCcl2aXoXxKqTJlRzHwZsU9CFzvG0LmWDMFsZM6zMfJorNbztVxR0ANbuTMctMYUkOm+td2fQMEnWcLymvlzQ0k7krxvkG+URXGjWs6EKoLUJq0LRisv4DNQTAYxVLThA927Db4rC3pzGub+5Pqmr2W9euaGyP7KrxrjjQRtXDvxjM/dELc1iM4o/y/vCMO2E47Txkizzvb7j63qeh4R3oWhww4r2JOXdgnJZDR6qlvgGckEMr1OhPxtjvUMLCt4dHQ== 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=QxsV9lRsVPSEZ6bA3gzml966qcYRbzem47p0hRFjfjg=; b=ZxLponlV1NNLh2zf24j0gq/NIo1TnmtUxxRGTeuK45Rf7tVM2ozkIzw9EMJBK5YxBCLBHgV8Ej7YFH2ncYHUisSpkJCKlz9nWNgNv+NRzaTJJX53GpCZ/4AXAU88bOEDfgAWIX/zTxnmV1To5qAyzMZLFve9sc6FRPXKVoKpiQI= Received: from BN6PR11MB4145.namprd11.prod.outlook.com (10.255.129.84) by BN6SPR00MB230.namprd11.prod.outlook.com (10.173.33.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.16; Wed, 20 Nov 2019 12:10:23 +0000 Received: from BN6PR11MB4145.namprd11.prod.outlook.com ([fe80::4495:388c:86e3:546]) by BN6PR11MB4145.namprd11.prod.outlook.com ([fe80::4495:388c:86e3:546%4]) with mapi id 15.20.2451.031; Wed, 20 Nov 2019 12:10:23 +0000 From: "Kinsella, Ray" To: "Burakov, Anatoly" , "dev@dpdk.org" CC: "Baran, MarcinX" , Thomas Monjalon , "Richardson, Bruce" , "Mcnamara, John" , "david.marchand@redhat.com" , Pawel Modrak , "Yigit, Ferruh" Thread-Topic: [PATCH v7 01/10] config: change ABI versioning to global Thread-Index: AQHVllEoV5nJosHojkyQ7h+tAoXn6KeUCW9Q Date: Wed, 20 Nov 2019 12:10:22 +0000 Message-ID: References: <24aae2ed616a13f9597cc6059f0288ddd91bf359.1573230233.git.anatoly.burakov@intel.com> In-Reply-To: <24aae2ed616a13f9597cc6059f0288ddd91bf359.1573230233.git.anatoly.burakov@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzNiNmFkZWQtN2M5MS00N2VkLWJkZjAtNjRlYjIxNjI5NTRkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiN0lJY1lqN0hBV3hkMW1RVzlKdjF1c1pvWTkrQVo1SVhudmU5c0F6amszNGhLek1BTmthT2VIcDJodE1KWGk2VyJ9 dlp-version: 11.2.0.6 dlp-product: dlpe-windows x-ctpclassification: CTP_NT dlp-reaction: no-action authentication-results: spf=none (sender IP is ) smtp.mailfrom=ray.kinsella@intel.com; x-originating-ip: [192.198.151.182] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8aaf9ace-2510-4049-914d-08d76db29ef8 x-ms-traffictypediagnostic: BN6SPR00MB230: 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:8882; x-forefront-prvs: 02272225C5 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(346002)(39860400002)(396003)(136003)(366004)(189003)(199004)(13464003)(486006)(6436002)(2501003)(9686003)(66066001)(316002)(476003)(107886003)(2906002)(6246003)(55016002)(7736002)(5660300002)(74316002)(52536014)(66446008)(305945005)(71190400001)(71200400001)(256004)(64756008)(66556008)(478600001)(66946007)(66476007)(33656002)(76116006)(76176011)(25786009)(86362001)(26005)(7696005)(6506007)(102836004)(53546011)(446003)(11346002)(8676002)(99286004)(3846002)(6116002)(81166006)(81156014)(8936002)(229853002)(110136005)(54906003)(14454004)(4326008)(186003); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6SPR00MB230; H:BN6PR11MB4145.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WhC4rt4szJjNVR3khiXAJGBqTb+lst9Um1FgHTrasRoV3OAleAXfbMW/usgRNg+FfLEwnYZz51S2U3mPDaMTBYj/ri6tuD5twJrQ4AKQvHvgT8RcXnQEBOdxRrYD6y0flG3p7W73N2WYd6IDXuf0uX3h2rfx0Uv1aiTPPdq5Z3/qsdEDZgxGw74jbz2JsdIhvH2xKMkvh1j+ng5ENdA/IwnIJcitZHFeJjP7D1joxQrKovMiF0+3aSqLNsXLA8nAB21yHsg527fKxjXJTgiDJ9lFBD+rUQbdN7BqkVmbV27peB0L1KWR+CCXVJamAPFllTTzCEOA+rRZrrOIaux7PLRBRBZZvf10FL4annaZ2COnxmZXw9HLlROWpdU4GWofZlQa1/Lb+XuWQcvKKP/dGFC49PtK5zmPskxvwjJnnmcvTM+hNqsgJc7McefGOMd4 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 8aaf9ace-2510-4049-914d-08d76db29ef8 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Nov 2019 12:10:22.9284 (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: mZ3tUllZ8huYe6Jjp2ZJVDBLhjq/wldSi9cjCTcVDZbWEmmbFvSFdYwuAs3OGnOMmPArt0ebC/9e0dhuF92pDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6SPR00MB230 X-OriginatorOrg: intel.com X-Mailman-Approved-At: Wed, 20 Nov 2019 18:31:23 +0100 Subject: Re: [dpdk-dev] [PATCH v7 01/10] config: change ABI versioning to global 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: Burakov, Anatoly > Sent: Friday 8 November 2019 16:25 > To: dev@dpdk.org > Cc: Baran, MarcinX ; Thomas Monjalon > ; Richardson, Bruce ; > Mcnamara, John ; Kinsella, Ray > ; david.marchand@redhat.com; Pawel Modrak > > Subject: [PATCH v7 01/10] config: change ABI versioning to global >=20 > From: Marcin Baran >=20 > As per new ABI policy, all of the libraries are now versioned using one > global ABI version. Changes in this patch implement the necessary steps > to enable that. >=20 > Signed-off-by: Marcin Baran > Signed-off-by: Pawel Modrak > Signed-off-by: Anatoly Burakov > Acked-by: Bruce Richardson > --- >=20 > Notes: > v6: > - Silenced grep error message on trying to grep a directory >=20 > v3: > - Removed Windows support from Makefile changes > - Removed unneeded path conversions from meson files >=20 > buildtools/meson.build | 2 ++ > config/ABI_VERSION | 1 + > config/meson.build | 4 +++- > drivers/meson.build | 20 ++++++++++++-------- > lib/meson.build | 18 ++++++++++++------ > meson_options.txt | 2 -- > mk/rte.lib.mk | 13 ++++--------- > 7 files changed, 34 insertions(+), 26 deletions(-) create mode 100644 > config/ABI_VERSION >=20 > diff --git a/buildtools/meson.build b/buildtools/meson.build index > 32c79c1308..78ce69977d 100644 > --- a/buildtools/meson.build > +++ b/buildtools/meson.build > @@ -12,3 +12,5 @@ if python3.found() > else > map_to_def_cmd =3D ['meson', 'runpython', files('map_to_def.py')] > endif > + > +is_experimental_cmd =3D [find_program('grep', 'findstr'), '^DPDK_'] > diff --git a/config/ABI_VERSION b/config/ABI_VERSION new file mode > 100644 index 0000000000..9a7c1e503f > --- /dev/null > +++ b/config/ABI_VERSION > @@ -0,0 +1 @@ > +20.0 > diff --git a/config/meson.build b/config/meson.build index > 2b1cb92e7e..30aa2a5313 100644 > --- a/config/meson.build > +++ b/config/meson.build > @@ -18,6 +18,8 @@ endforeach > # depending on the configuration options pver =3D > meson.project_version().split('.') > major_version =3D '@0@.@1@'.format(pver.get(0), pver.get(1)) > +abi_version =3D run_command(find_program('cat', 'more'), > + files('ABI_VERSION')).stdout().strip() >=20 > # extract all version information into the build configuration > dpdk_conf.set('RTE_VER_YEAR', pver.get(0).to_int()) @@ -37,7 +39,7 @@ > endif >=20 > pmd_subdir_opt =3D get_option('drivers_install_subdir') > if pmd_subdir_opt.contains('') > - pmd_subdir_opt =3D > major_version.join(pmd_subdir_opt.split('')) > + pmd_subdir_opt =3D > abi_version.join(pmd_subdir_opt.split('')) > endif > driver_install_path =3D join_paths(get_option('libdir'), pmd_subdir_opt) > eal_pmd_path =3D join_paths(get_option('prefix'), driver_install_path) > diff --git a/drivers/meson.build b/drivers/meson.build index > 156d2dc717..b03e0c3159 100644 > --- a/drivers/meson.build > +++ b/drivers/meson.build > @@ -124,12 +124,19 @@ foreach class:dpdk_driver_classes > output: out_filename, > depends: [pmdinfogen, tmp_lib]) >=20 > - if get_option('per_library_versions') > - lib_version =3D '@0@.1'.format(version) > - so_version =3D '@0@'.format(version) > + version_map =3D '@0@/@1@/@2@_version.map'.format( > + meson.current_source_dir(), > + drv_path, lib_name) > + > + is_experimental =3D run_command(is_experimental_cmd, > + files(version_map)).returncode() > + > + if is_experimental !=3D 0 > + lib_version =3D '0.1' [rk] This all makes sense - except this part. [rk] I would expect the experimental major version to always be zero ... [rk] However I would expect the minor version to increment with each new re= lease or at the maintainers discretion.=20 > + so_version =3D '0' > else > - lib_version =3D major_version > - so_version =3D major_version > + lib_version =3D abi_version > + so_version =3D abi_version > endif >=20 > # now build the static driver > @@ -142,9 +149,6 @@ foreach class:dpdk_driver_classes > install: true) >=20 > # now build the shared driver > - version_map =3D '@0@/@1@/@2@_version.map'.format( > - meson.current_source_dir(), > - drv_path, lib_name) > shared_lib =3D shared_library(lib_name, > sources, > objects: objs, > diff --git a/lib/meson.build b/lib/meson.build index > b2ec9c09a9..3cff2482b1 100644 > --- a/lib/meson.build > +++ b/lib/meson.build > @@ -106,12 +106,18 @@ foreach l:libraries > cflags +=3D '-DRTE_USE_FUNCTION_VERSIONING' > endif >=20 > - if get_option('per_library_versions') > - lib_version =3D '@0@.1'.format(version) > - so_version =3D '@0@'.format(version) > + version_map =3D '@0@/@1@/rte_@2@_version.map'.format( > + meson.current_source_dir(), dir_name, name) > + > + is_experimental =3D run_command(is_experimental_cmd, > + files(version_map)).returncode() > + > + if is_experimental !=3D 0 > + lib_version =3D '0.1' > + so_version =3D '0' > else > - lib_version =3D major_version > - so_version =3D major_version > + lib_version =3D abi_version > + so_version =3D abi_version > endif >=20 > # first build static lib > @@ -127,7 +133,7 @@ foreach l:libraries > dependencies: static_deps) >=20 > if not use_function_versioning > - # use pre-build objects to build shared lib > + # then use pre-build objects to build shared lib > sources =3D [] > objs +=3D static_lib.extract_all_objects(recursive: > false) > else > diff --git a/meson_options.txt b/meson_options.txt index > 89650b0e9c..da6a7f0302 100644 > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -30,8 +30,6 @@ option('max_lcores', type: 'integer', value: 128, > description: 'maximum number of cores/threads supported by EAL') > option('max_numa_nodes', type: 'integer', value: 4, > description: 'maximum number of NUMA nodes supported by EAL') - > option('per_library_versions', type: 'boolean', value: true, > - description: 'true: each lib gets its own version number, false: > DPDK version used for each lib') > option('tests', type: 'boolean', value: true, > description: 'build unit tests') > option('use_hpet', type: 'boolean', value: false, diff --git > a/mk/rte.lib.mk b/mk/rte.lib.mk index 4df8849a08..b49af9192b 100644 > --- a/mk/rte.lib.mk > +++ b/mk/rte.lib.mk > @@ -11,20 +11,15 @@ EXTLIB_BUILD ?=3D n > # VPATH contains at least SRCDIR > VPATH +=3D $(SRCDIR) >=20 > -ifneq ($(CONFIG_RTE_MAJOR_ABI),) > -ifneq ($(LIBABIVER),) > -LIBABIVER :=3D $(CONFIG_RTE_MAJOR_ABI) > -endif > +ifneq ($(shell grep -s "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),) LIBABIVER > :=3D > +$(shell cat $(RTE_SRCDIR)/config/ABI_VERSION) else LIBABIVER :=3D 0 > endif >=20 > ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) > LIB :=3D $(patsubst %.a,%.so.$(LIBABIVER),$(LIB)) ifeq > ($(EXTLIB_BUILD),n) -ifeq ($(CONFIG_RTE_MAJOR_ABI),) -ifeq > ($(CONFIG_RTE_NEXT_ABI),y) -LIB :=3D $(LIB).1 -endif -endif CPU_LDFLAGS > +=3D --version-script=3D$(SRCDIR)/$(EXPORT_MAP) > endif > endif > -- > 2.17.1