[v3,1/9] config: change ABI versioning to global

Message ID 671cb144be5089abff524ef452ad7bb8b6778524.1571245316.git.anatoly.burakov@intel.com (mailing list archive)
State Superseded, archived
Headers
Series Implement the new ABI policy and add helper scripts |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS

Commit Message

Burakov, Anatoly Oct. 16, 2019, 5:03 p.m. UTC
  From: Marcin Baran <marcinx.baran@intel.com>

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 <marcinx.baran@intel.com>
Signed-off-by: Pawel Modrak <pawelx.modrak@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---

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     |  5 +++--
 drivers/meson.build    | 20 ++++++++++++--------
 lib/meson.build        | 18 +++++++++++-------
 meson_options.txt      |  2 --
 mk/rte.lib.mk          | 13 ++++---------
 7 files changed, 33 insertions(+), 28 deletions(-)
 create mode 100644 config/ABI_VERSION
  

Comments

Bruce Richardson Oct. 17, 2019, 8:44 a.m. UTC | #1
On Wed, Oct 16, 2019 at 06:03:36PM +0100, Anatoly Burakov wrote:
> From: Marcin Baran <marcinx.baran@intel.com>
> 
> 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 <marcinx.baran@intel.com>
> Signed-off-by: Pawel Modrak <pawelx.modrak@intel.com>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
> 
> 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     |  5 +++--
>  drivers/meson.build    | 20 ++++++++++++--------
>  lib/meson.build        | 18 +++++++++++-------
>  meson_options.txt      |  2 --
>  mk/rte.lib.mk          | 13 ++++---------
>  7 files changed, 33 insertions(+), 28 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 = ['meson', 'runpython', files('map_to_def.py')]
>  endif
> +
> +is_experimental_cmd = [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 a27f731f85..3cfc02406c 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -17,7 +17,8 @@ endforeach
>  # set the major version, which might be used by drivers and libraries
>  # depending on the configuration options
>  pver = meson.project_version().split('.')
> -major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
> +abi_version = run_command(find_program('cat', 'more'),
> +	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 +38,7 @@ endif
>  
>  pmd_subdir_opt = get_option('drivers_install_subdir')
>  if pmd_subdir_opt.contains('<VERSION>')
> -	pmd_subdir_opt = major_version.join(pmd_subdir_opt.split('<VERSION>'))
> +	pmd_subdir_opt = abi_version.join(pmd_subdir_opt.split('<VERSION>'))
>  endif

This is an interesting change, and I'm not sure about it. I think for
user-visible changes, version should still refer to DPDK version rather
than ABI version. Even with a stable ABI, it makes more sense to me to find
the drivers in a 19.11 directory than a 20.0 one. Then again, the drivers
should be re-usable across the one ABI version, so perhaps this is the best
approach.

Thoughts from others? Luca or Kevin, any thoughts from a packagers
perspective?

/Bruce
  
Burakov, Anatoly Oct. 17, 2019, 10:25 a.m. UTC | #2
On 17-Oct-19 9:44 AM, Bruce Richardson wrote:
> On Wed, Oct 16, 2019 at 06:03:36PM +0100, Anatoly Burakov wrote:
>> From: Marcin Baran <marcinx.baran@intel.com>
>>
>> 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 <marcinx.baran@intel.com>
>> Signed-off-by: Pawel Modrak <pawelx.modrak@intel.com>
>> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
>> ---
>>
>> 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     |  5 +++--
>>   drivers/meson.build    | 20 ++++++++++++--------
>>   lib/meson.build        | 18 +++++++++++-------
>>   meson_options.txt      |  2 --
>>   mk/rte.lib.mk          | 13 ++++---------
>>   7 files changed, 33 insertions(+), 28 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 = ['meson', 'runpython', files('map_to_def.py')]
>>   endif
>> +
>> +is_experimental_cmd = [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 a27f731f85..3cfc02406c 100644
>> --- a/config/meson.build
>> +++ b/config/meson.build
>> @@ -17,7 +17,8 @@ endforeach
>>   # set the major version, which might be used by drivers and libraries
>>   # depending on the configuration options
>>   pver = meson.project_version().split('.')
>> -major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
>> +abi_version = run_command(find_program('cat', 'more'),
>> +	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 +38,7 @@ endif
>>   
>>   pmd_subdir_opt = get_option('drivers_install_subdir')
>>   if pmd_subdir_opt.contains('<VERSION>')
>> -	pmd_subdir_opt = major_version.join(pmd_subdir_opt.split('<VERSION>'))
>> +	pmd_subdir_opt = abi_version.join(pmd_subdir_opt.split('<VERSION>'))
>>   endif
> 
> This is an interesting change, and I'm not sure about it. I think for
> user-visible changes, version should still refer to DPDK version rather
> than ABI version. Even with a stable ABI, it makes more sense to me to find
> the drivers in a 19.11 directory than a 20.0 one. Then again, the drivers
> should be re-usable across the one ABI version, so perhaps this is the best
> approach.
> 
> Thoughts from others? Luca or Kevin, any thoughts from a packagers
> perspective?
> 
> /Bruce

I can certainly change it back. This wasn't intentional - i just did a 
search-and-replace without thinking too much about it :)
  
Luca Boccassi Oct. 17, 2019, 2:09 p.m. UTC | #3
On Thu, 2019-10-17 at 09:44 +0100, Bruce Richardson wrote:
> On Wed, Oct 16, 2019 at 06:03:36PM +0100, Anatoly Burakov wrote:
> > From: Marcin Baran <
> > marcinx.baran@intel.com
> > >
> > 
> > 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 <
> > marcinx.baran@intel.com
> > >
> > Signed-off-by: Pawel Modrak <
> > pawelx.modrak@intel.com
> > >
> > Signed-off-by: Anatoly Burakov <
> > anatoly.burakov@intel.com
> > >
> > ---
> > 
> > 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     |  5 +++--
> >  drivers/meson.build    | 20 ++++++++++++--------
> >  lib/meson.build        | 18 +++++++++++-------
> >  meson_options.txt      |  2 --
> >  mk/rte.lib.mk          | 13 ++++---------
> >  7 files changed, 33 insertions(+), 28 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 = ['meson', 'runpython', files('map_to_def.py')]
> >  endif
> > +
> > +is_experimental_cmd = [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 a27f731f85..3cfc02406c 100644
> > --- a/config/meson.build
> > +++ b/config/meson.build
> > @@ -17,7 +17,8 @@ endforeach
> >  # set the major version, which might be used by drivers and
> > libraries
> >  # depending on the configuration options
> >  pver = meson.project_version().split('.')
> > -major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
> > +abi_version = run_command(find_program('cat', 'more'),
> > +	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 +38,7 @@ endif
> >  
> >  pmd_subdir_opt = get_option('drivers_install_subdir')
> >  if pmd_subdir_opt.contains('<VERSION>')
> > -	pmd_subdir_opt =
> > major_version.join(pmd_subdir_opt.split('<VERSION>'))
> > +	pmd_subdir_opt =
> > abi_version.join(pmd_subdir_opt.split('<VERSION>'))
> >  endif
> 
> This is an interesting change, and I'm not sure about it. I think for
> user-visible changes, version should still refer to DPDK version
> rather
> than ABI version. Even with a stable ABI, it makes more sense to me
> to find
> the drivers in a 19.11 directory than a 20.0 one. Then again, the
> drivers
> should be re-usable across the one ABI version, so perhaps this is
> the best
> approach.
> 
> Thoughts from others? Luca or Kevin, any thoughts from a packagers
> perspective?
> 
> /Bruce

Hi,

We are currently assembing this path using the ABI version in
Debian/Ubuntu, as we want same-ABI libraries not to be co-installed,
but instead fo use the exact same name/path. So from our POV this
change seems right.
  
Bruce Richardson Oct. 17, 2019, 2:12 p.m. UTC | #4
On Thu, Oct 17, 2019 at 03:09:00PM +0100, Luca Boccassi wrote:
> On Thu, 2019-10-17 at 09:44 +0100, Bruce Richardson wrote:
> > On Wed, Oct 16, 2019 at 06:03:36PM +0100, Anatoly Burakov wrote:
> > > From: Marcin Baran <
> > > marcinx.baran@intel.com
> > > >
> > > 
> > > 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 <
> > > marcinx.baran@intel.com
> > > >
> > > Signed-off-by: Pawel Modrak <
> > > pawelx.modrak@intel.com
> > > >
> > > Signed-off-by: Anatoly Burakov <
> > > anatoly.burakov@intel.com
> > > >
> > > ---
> > > 
> > > 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     |  5 +++--
> > >  drivers/meson.build    | 20 ++++++++++++--------
> > >  lib/meson.build        | 18 +++++++++++-------
> > >  meson_options.txt      |  2 --
> > >  mk/rte.lib.mk          | 13 ++++---------
> > >  7 files changed, 33 insertions(+), 28 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 = ['meson', 'runpython', files('map_to_def.py')]
> > >  endif
> > > +
> > > +is_experimental_cmd = [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 a27f731f85..3cfc02406c 100644
> > > --- a/config/meson.build
> > > +++ b/config/meson.build
> > > @@ -17,7 +17,8 @@ endforeach
> > >  # set the major version, which might be used by drivers and
> > > libraries
> > >  # depending on the configuration options
> > >  pver = meson.project_version().split('.')
> > > -major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
> > > +abi_version = run_command(find_program('cat', 'more'),
> > > +	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 +38,7 @@ endif
> > >  
> > >  pmd_subdir_opt = get_option('drivers_install_subdir')
> > >  if pmd_subdir_opt.contains('<VERSION>')
> > > -	pmd_subdir_opt =
> > > major_version.join(pmd_subdir_opt.split('<VERSION>'))
> > > +	pmd_subdir_opt =
> > > abi_version.join(pmd_subdir_opt.split('<VERSION>'))
> > >  endif
> > 
> > This is an interesting change, and I'm not sure about it. I think for
> > user-visible changes, version should still refer to DPDK version
> > rather
> > than ABI version. Even with a stable ABI, it makes more sense to me
> > to find
> > the drivers in a 19.11 directory than a 20.0 one. Then again, the
> > drivers
> > should be re-usable across the one ABI version, so perhaps this is
> > the best
> > approach.
> > 
> > Thoughts from others? Luca or Kevin, any thoughts from a packagers
> > perspective?
> > 
> > /Bruce
> 
> Hi,
> 
> We are currently assembing this path using the ABI version in
> Debian/Ubuntu, as we want same-ABI libraries not to be co-installed,
> but instead fo use the exact same name/path. So from our POV this
> change seems right.
> 
Thanks for confirming, Luca.
  
Kevin Traynor Oct. 18, 2019, 10:07 a.m. UTC | #5
On 17/10/2019 15:09, Luca Boccassi wrote:
> On Thu, 2019-10-17 at 09:44 +0100, Bruce Richardson wrote:
>> On Wed, Oct 16, 2019 at 06:03:36PM +0100, Anatoly Burakov wrote:
>>> From: Marcin Baran <
>>> marcinx.baran@intel.com
>>>>
>>>
>>> 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 <
>>> marcinx.baran@intel.com
>>>>
>>> Signed-off-by: Pawel Modrak <
>>> pawelx.modrak@intel.com
>>>>
>>> Signed-off-by: Anatoly Burakov <
>>> anatoly.burakov@intel.com
>>>>
>>> ---
>>>
>>> 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     |  5 +++--
>>>  drivers/meson.build    | 20 ++++++++++++--------
>>>  lib/meson.build        | 18 +++++++++++-------
>>>  meson_options.txt      |  2 --
>>>  mk/rte.lib.mk          | 13 ++++---------
>>>  7 files changed, 33 insertions(+), 28 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 = ['meson', 'runpython', files('map_to_def.py')]
>>>  endif
>>> +
>>> +is_experimental_cmd = [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 a27f731f85..3cfc02406c 100644
>>> --- a/config/meson.build
>>> +++ b/config/meson.build
>>> @@ -17,7 +17,8 @@ endforeach
>>>  # set the major version, which might be used by drivers and
>>> libraries
>>>  # depending on the configuration options
>>>  pver = meson.project_version().split('.')
>>> -major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
>>> +abi_version = run_command(find_program('cat', 'more'),
>>> +	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 +38,7 @@ endif
>>>  
>>>  pmd_subdir_opt = get_option('drivers_install_subdir')
>>>  if pmd_subdir_opt.contains('<VERSION>')
>>> -	pmd_subdir_opt =
>>> major_version.join(pmd_subdir_opt.split('<VERSION>'))
>>> +	pmd_subdir_opt =
>>> abi_version.join(pmd_subdir_opt.split('<VERSION>'))
>>>  endif
>>
>> This is an interesting change, and I'm not sure about it. I think for
>> user-visible changes, version should still refer to DPDK version
>> rather
>> than ABI version. Even with a stable ABI, it makes more sense to me
>> to find
>> the drivers in a 19.11 directory than a 20.0 one. Then again, the
>> drivers
>> should be re-usable across the one ABI version, so perhaps this is
>> the best
>> approach.
>>
>> Thoughts from others? Luca or Kevin, any thoughts from a packagers
>> perspective?
>>
>> /Bruce
> 
> Hi,
> 
> We are currently assembing this path using the ABI version in
> Debian/Ubuntu, as we want same-ABI libraries not to be co-installed,
> but instead fo use the exact same name/path. So from our POV this
> change seems right.
> 

Seems ok to me as it's consistent with having the libs from different
releases using one ABI version. Would like to check with Timothy too..

+ Timothy
  

Patch

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 = ['meson', 'runpython', files('map_to_def.py')]
 endif
+
+is_experimental_cmd = [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 a27f731f85..3cfc02406c 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -17,7 +17,8 @@  endforeach
 # set the major version, which might be used by drivers and libraries
 # depending on the configuration options
 pver = meson.project_version().split('.')
-major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
+abi_version = run_command(find_program('cat', 'more'),
+	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 +38,7 @@  endif
 
 pmd_subdir_opt = get_option('drivers_install_subdir')
 if pmd_subdir_opt.contains('<VERSION>')
-	pmd_subdir_opt = major_version.join(pmd_subdir_opt.split('<VERSION>'))
+	pmd_subdir_opt = abi_version.join(pmd_subdir_opt.split('<VERSION>'))
 endif
 driver_install_path = join_paths(get_option('libdir'), pmd_subdir_opt)
 eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
diff --git a/drivers/meson.build b/drivers/meson.build
index 2ed2e95411..fd628d9587 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -110,12 +110,19 @@  foreach class:dpdk_driver_classes
 					output: out_filename,
 					depends: [pmdinfogen, tmp_lib])
 
-			if get_option('per_library_versions')
-				lib_version = '@0@.1'.format(version)
-				so_version = '@0@'.format(version)
+			version_map = '@0@/@1@/@2@_version.map'.format(
+					meson.current_source_dir(),
+					drv_path, lib_name)
+
+			is_experimental = run_command(is_experimental_cmd,
+				files(version_map)).returncode()
+
+			if is_experimental != 0
+				lib_version = '0.1'
+				so_version = '0'
 			else
-				lib_version = major_version
-				so_version = major_version
+				lib_version = abi_version
+				so_version = abi_version
 			endif
 
 			# now build the static driver
@@ -128,9 +135,6 @@  foreach class:dpdk_driver_classes
 				install: true)
 
 			# now build the shared driver
-			version_map = '@0@/@1@/@2@_version.map'.format(
-					meson.current_source_dir(),
-					drv_path, lib_name)
 			shared_lib = shared_library(lib_name,
 				sources,
 				objects: objs,
diff --git a/lib/meson.build b/lib/meson.build
index e5ff838934..e626da778c 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -97,12 +97,18 @@  foreach l:libraries
 				cflags += '-DALLOW_EXPERIMENTAL_API'
 			endif
 
-			if get_option('per_library_versions')
-				lib_version = '@0@.1'.format(version)
-				so_version = '@0@'.format(version)
+			version_map = '@0@/@1@/rte_@2@_version.map'.format(
+					meson.current_source_dir(), dir_name, name)
+
+			is_experimental = run_command(is_experimental_cmd,
+					files(version_map)).returncode()
+
+			if is_experimental != 0
+				lib_version = '0.1'
+				so_version = '0'
 			else
-				lib_version = major_version
-				so_version = major_version
+				lib_version = abi_version
+				so_version = abi_version
 			endif
 
 			# first build static lib
@@ -120,8 +126,6 @@  foreach l:libraries
 			# then use pre-build objects to build shared lib
 			sources = []
 			objs += static_lib.extract_all_objects(recursive: false)
-			version_map = '@0@/@1@/rte_@2@_version.map'.format(
-					meson.current_source_dir(), dir_name, name)
 			implib = dir_name + '.dll.a'
 
 			def_file = custom_target(name + '_def',
diff --git a/meson_options.txt b/meson_options.txt
index 448f3e63dc..000e38fd98 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -28,8 +28,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 ?= n
 # VPATH contains at least SRCDIR
 VPATH += $(SRCDIR)
 
-ifneq ($(CONFIG_RTE_MAJOR_ABI),)
-ifneq ($(LIBABIVER),)
-LIBABIVER := $(CONFIG_RTE_MAJOR_ABI)
-endif
+ifneq ($(shell grep "^DPDK_" $(SRCDIR)/$(EXPORT_MAP)),)
+LIBABIVER := $(shell cat $(RTE_SRCDIR)/config/ABI_VERSION)
+else
+LIBABIVER := 0
 endif
 
 ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
 LIB := $(patsubst %.a,%.so.$(LIBABIVER),$(LIB))
 ifeq ($(EXTLIB_BUILD),n)
-ifeq ($(CONFIG_RTE_MAJOR_ABI),)
-ifeq ($(CONFIG_RTE_NEXT_ABI),y)
-LIB := $(LIB).1
-endif
-endif
 CPU_LDFLAGS += --version-script=$(SRCDIR)/$(EXPORT_MAP)
 endif
 endif