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 6552FA0353; Tue, 5 Nov 2019 12:05:31 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 31F8037B4; Tue, 5 Nov 2019 12:05:31 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 20AEB2C23 for ; Tue, 5 Nov 2019 12:05:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572951929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rEgCkgDCBsZg1pxwYqUZgPs5xhr0FvP1ya/8l59utrk=; b=M0YrpKnmugPbbR+Q3JfQ5j/jL2RT5HRa32zkIgt4TRh3cyIUEKE/8lZH5+Gj7dNSWLshGM dGrwr4RVpNbaE6XZWiJWvqLJNq6eIK0XzvYwjMwUk+NA+Y88ziNJ8k5b9/F11WObJYubv8 uRmTU3A5Lv3LooLCWiTDa6O80fjll4E= Received: from mail-vk1-f199.google.com (mail-vk1-f199.google.com [209.85.221.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-20-4VnBLLk5MOmyedw5Xi5RFg-1; Tue, 05 Nov 2019 06:05:28 -0500 Received: by mail-vk1-f199.google.com with SMTP id n6so9093794vke.22 for ; Tue, 05 Nov 2019 03:05:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TKXw7H/wAS0gok8VSFHCOpV3QwvsPGrW1nODRiinOxU=; b=e6BdPKAePLYVdg0GC9O8GyGTjutYiQisiJhEcdYYF+NrGZDHIJ9mW78YVPfgzvVxvG RK1/6mmqGQQnLv2nUvdRcijyEgC+IbRL7TVo30O+N/hkdToWejyng+lCdRFddPj7kxEG wHmwBp1VWh+KNqIP4qx/S+GW4VkSC+vVDn4bibfdbyHVYzk9rBBbTnB0FGtucIsp4Drg q5B0VE/8KzKCzc7hAoMlqWll9eXP77HBpBb+/6nhXjPuEaU0crjOn6mF4dyjXdscEBJO occcDgO3GcP21GGSRPkrilS4BaUC5glpIxgyms0zUnvwTnEq+nTGLiDX2QEOUJJwlxCQ f8oQ== X-Gm-Message-State: APjAAAVGNlMYvsV8Ims9xXNhJSRHJ54UgZwKNodZKFxviXIdnD7Q7bzJ 7i6s3+Vi3TFu/o2J9CfhFGjg5LeFmPFfZqkS7Kkjg2gbGYxhsDEIAtPpJNp240IpGYRuIhcucdn PqYR019tOFKWTT+0GGE4= X-Received: by 2002:a1f:e243:: with SMTP id z64mr13369423vkg.56.1572951927315; Tue, 05 Nov 2019 03:05:27 -0800 (PST) X-Google-Smtp-Source: APXvYqzlC+2sY4hJ1AaNz3/vHD/MqDgDga4gHhKDiPdqntmYsfFmV88i03mGC1lOeRzU2ph+jbTb3VoPse6ZAiFXuDE= X-Received: by 2002:a1f:e243:: with SMTP id z64mr13369394vkg.56.1572951926777; Tue, 05 Nov 2019 03:05:26 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: David Marchand Date: Tue, 5 Nov 2019 12:05:15 +0100 Message-ID: To: Anatoly Burakov Cc: dev , Marcin Baran , Thomas Monjalon , Bruce Richardson , "Mcnamara, John" , "Kinsella, Ray" , Pawel Modrak X-MC-Unique: 4VnBLLk5MOmyedw5Xi5RFg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v5 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" On Thu, Oct 24, 2019 at 11:46 AM Anatoly Burakov wrote: > > From: Marcin Baran > > 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. > > Signed-off-by: Marcin Baran > Signed-off-by: Pawel Modrak > Signed-off-by: Anatoly Burakov > Acked-by: Bruce Richardson > --- > > Notes: > v3: > - Removed Windows support from Makefile changes > - Removed unneeded path conversions from meson files > > 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, 33 insertions(+), 27 deletions(-) > create mode 100644 config/ABI_VERSION > > 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_'] Traces from the windows stuff? > 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 acacba704a..40ad34345f 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'), Idem. > + files('ABI_VERSION')).stdout().strip() > > # extract all version information into the build configuration > dpdk_conf.set('RTE_VER_YEAR', pver.get(0).to_int()) > @@ -37,7 +39,7 @@ endif > > 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 4a1cb8b5be..1c1190053e 100644 > --- a/drivers/meson.build > +++ b/drivers/meson.build > @@ -119,12 +119,19 @@ foreach class:dpdk_driver_classes > output: out_filename, > depends: [pmdinfogen, tmp_lib]) > > - 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_c= md, > + 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 > > # now build the static driver > @@ -137,9 +144,6 @@ foreach class:dpdk_driver_classes > install: true) > > # 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 8ea3671c04..6302c0b680 100644 > --- a/lib/meson.build > +++ b/lib/meson.build > @@ -100,12 +100,18 @@ foreach l:libraries > cflags +=3D '-DALLOW_EXPERIMENTAL_API' > endif > > - 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'.for= mat( > + meson.current_source_dir(), dir_n= ame, name) > + > + is_experimental =3D run_command(is_experimental_c= md, > + 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 > > # first build static lib > @@ -123,8 +129,6 @@ foreach l:libraries > # then use pre-build objects to build shared lib > sources =3D [] > objs +=3D static_lib.extract_all_objects(recursiv= e: false) > - version_map =3D '@0@/@1@/rte_@2@_version.map'.for= mat( > - meson.current_source_dir(), dir_n= ame, name) > implib =3D dir_name + '.dll.a' > > def_file =3D custom_target(name + '_def', > 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..e1ea292b6e 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) > > -ifneq ($(CONFIG_RTE_MAJOR_ABI),) > -ifneq ($(LIBABIVER),) > -LIBABIVER :=3D $(CONFIG_RTE_MAJOR_ABI) > -endif > +ifneq ($(shell grep "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),) This generates noise for the ethtool lib in the associated example: =3D=3D ethtool =3D=3D lib grep: /home/dmarchan/dpdk/examples/ethtool/lib/: Is a directory LD librte_ethtool.so.0 INSTALL-LIB librte_ethtool.so.0 =3D=3D ethtool-app So either we add a map file for this example lib (a bit odd), or we silence this warning. > +LIBABIVER :=3D $(shell cat $(RTE_SRCDIR)/config/ABI_VERSION) > +else > +LIBABIVER :=3D 0 > endif > > 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