build: add drivers_install_subdir meson option
Subsystems (2)
PATCH 1/1 build: add drivers_install_subdir meson option
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
--- meson.build | 3 ++- meson_options.txt | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-)
meson.build +2 -1
@@ -15,7 +15,8 @@ dpdk_libraries = [] dpdk_drivers = [] dpdk_extra_ldflags = [] -driver_install_path = join_paths(get_option('libdir'), 'dpdk/drivers') +driver_install_path = join_paths(get_option('libdir'), + get_option('drivers_install_subdir')) eal_pmd_path = join_paths(get_option('prefix'), driver_install_path) # configure the build, and make sure configs here and in config folder are
meson_options.txt +2 -0
@@ -1,5 +1,7 @@ option('allow_invalid_socket_id', type: 'boolean', value: false, description: 'allow out-of-range NUMA socket id\'s for platforms that don\'t report the value correctly') +option('drivers_install_subdir', type: 'string', value: 'dpdk/drivers', + description: 'subdirectory of libdir where to install PMDs') option('enable_driver_mlx_glue', type: 'boolean', value: false, description: 'Enable glue library for Mellanox ConnectX-3/4/5 NIC PMD') option('enable_kmods', type: 'boolean', value: true,
Signature · 1 line
2.19.0
Quoted 5 lines · Luca Boccassi
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
Signed-off-by Luca Boccassi <[email protected]>---
I'm ok with this change, but what is the current location used by distro's right now? I mistakenly never checked what was done before I used dpdk/drivers as a default value, and I'd like the default to match the common option if possible.
/Bruce
Quoted 7 lines · Bruce Richardson
Quoted 5 lines · Luca Boccassi
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
Signed-off-by Luca Boccassi <[email protected]>---
Quoted 7 lines
I'm ok with this change, but what is the current location used by distro's right now? I mistakenly never checked what was done before I used dpdk/drivers as a default value, and I'd like the default to match the common option if possible.
/Bruce
Replying to my own question, I've just checked on CentOS and Debian, and it appears both are using directory "dpdk-pmds" as the subdir name. Therefore, let's just make that the default. [Does it need to be configurable in that case?]
/Bruce
Quoted 26 lines · Bruce Richardson
Quoted 7 lines · Bruce Richardson
Quoted 5 lines · Luca Boccassi
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
Signed-off-by Luca Boccassi <[email protected]>---
Quoted 9 lines
I'm ok with this change, but what is the current location used by distro's
right now? I mistakenly never checked what was done before I used dpdk/drivers as a default value, and I'd like the default to match the
common option if possible./Bruce
Replying to my own question, I've just checked on CentOS and Debian, and it
appears both are using directory "dpdk-pmds" as the subdir name. Therefore,
let's just make that the default. [Does it need to be configurable in that
case?]
Quoted 1 line
/Bruce
If the default is the one I expect then I'm fine without having an option (actually happier - less things to configure).
But in Debian/Ubuntu it's dpdk-MAJORVER-drivers since last January :-) We changed because using a single directory creates problems when multiple different ABI versions are installed, due to the EAL autoload from that directory. So we need a different subdirectory per ABI revision.
We were actually talking with Timothy a while ago to make this consistent across our distros, and perhaps Marco can chip in as well.
Timothy, Marco, is using dpdk-MAJORVER-$something ok for you? I'm not too fussy on $something, it can be drivers or pmds or something else.
Signature · 2 lines
Kind regards, Luca Boccassi
Bruce Richardson
Acked-byQuoted 38 lines · Luca Boccassi
Quoted 26 lines · Bruce Richardson
Quoted 7 lines · Bruce Richardson
Quoted 5 lines · Luca Boccassi
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
Signed-off-by Luca Boccassi <[email protected]>---
Quoted 9 lines
I'm ok with this change, but what is the current location used by distro's
right now? I mistakenly never checked what was done before I used dpdk/drivers as a default value, and I'd like the default to match the
common option if possible./Bruce
Replying to my own question, I've just checked on CentOS and Debian, and it
appears both are using directory "dpdk-pmds" as the subdir name. Therefore,
let's just make that the default. [Does it need to be configurable in that
case?]Quoted 1 line
/Bruce
If the default is the one I expect then I'm fine without having an option (actually happier - less things to configure).
But in Debian/Ubuntu it's dpdk-MAJORVER-drivers since last January :-) We changed because using a single directory creates problems when multiple different ABI versions are installed, due to the EAL autoload from that directory. So we need a different subdirectory per ABI revision.
Quoted 6 lines
We were actually talking with Timothy a while ago to make this consistent across our distros, and perhaps Marco can chip in as well.
Timothy, Marco, is using dpdk-MAJORVER-$something ok for you? I'm not too fussy on $something, it can be drivers or pmds or something else.
Sounds like it needs to be configurable, just in case.
Quoted 38 lines · On Mon, 01 Oct 2018 10:46:02 +0100 Luca Boccassi <[email protected]> wrote:
Quoted 26 lines · Bruce Richardson
Quoted 7 lines · Bruce Richardson
Quoted 5 lines · Luca Boccassi
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
Signed-off-by Luca Boccassi <[email protected]>---
Quoted 9 lines
I'm ok with this change, but what is the current location used by distro's
right now? I mistakenly never checked what was done before I used dpdk/drivers as a default value, and I'd like the default to match the
common option if possible./Bruce
Replying to my own question, I've just checked on CentOS and Debian, and it
appears both are using directory "dpdk-pmds" as the subdir name. Therefore,
let's just make that the default. [Does it need to be configurable in that
case?]Quoted 1 line
/Bruce
If the default is the one I expect then I'm fine without having an option (actually happier - less things to configure).
But in Debian/Ubuntu it's dpdk-MAJORVER-drivers since last January :-) We changed because using a single directory creates problems when multiple different ABI versions are installed, due to the EAL autoload from that directory. So we need a different subdirectory per ABI revision.
Quoted 6 lines
We were actually talking with Timothy a while ago to make this consistent across our distros, and perhaps Marco can chip in as well.
Timothy, Marco, is using dpdk-MAJORVER-$something ok for you? I'm not too fussy on $something, it can be drivers or pmds or something else.
LGTM.
If needed, we can just do a compatibility symlink using the current dpdk-pmds path
Quoted 44 lines · Timothy Redaelli
Quoted 41 lines · On Mon, 01 Oct 2018 10:46:02 +0100 Luca Boccassi <[email protected]> wrote:
Quoted 26 lines · Bruce Richardson
Quoted 7 lines · Bruce Richardson
Quoted 5 lines · Luca Boccassi
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
Signed-off-by Luca Boccassi <[email protected]>---
Quoted 9 lines
I'm ok with this change, but what is the current location used by distro's
right now? I mistakenly never checked what was done before I used dpdk/drivers as a default value, and I'd like the default to match the
common option if possible./Bruce
Replying to my own question, I've just checked on CentOS and Debian, and it
appears both are using directory "dpdk-pmds" as the subdir name. Therefore,
let's just make that the default. [Does it need to be configurable in that
case?]Quoted 1 line
/Bruce
If the default is the one I expect then I'm fine without having an option (actually happier - less things to configure).
But in Debian/Ubuntu it's dpdk-MAJORVER-drivers since last January :-) We changed because using a single directory creates problems when multiple different ABI versions are installed, due to the EAL autoload from that directory. So we need a different subdirectory per ABI revision.
We were actually talking with Timothy a while ago to make this consistent across our distros, and perhaps Marco can chip in as well.
Quoted 8 lines
Quoted 3 lines
Timothy, Marco, is using dpdk-MAJORVER-$something ok for you? I'm not too fussy on $something, it can be drivers or pmds or something else.
LGTM.
If needed, we can just do a compatibility symlink using the current dpdk-pmds path
One suggestion/comment. Would using a unique directory per release not lead to clobbering up the lib directory unnecessarily? How about having a single "dpdk" or "dpdk-pmds" directory in lib, and having $MAJORVER as a subdir under that?
E.g. dpdk/pmds-18.08/, dpdk/pmds-18.11/, or dpdk-pmds/18.08/ dpdk-pmds/18.11
[The former of the above would be my preference, since I don't like having hypenated names, and like having "dpdk" alone as a folder name :-)]
/Bruce
Quoted 77 lines · Bruce Richardson
Quoted 63 lines · Timothy Redaelli
Quoted 50 lines · On Mon, 01 Oct 2018 10:46:02 +0100 Luca Boccassi <[email protected]> wrote:
Quoted 35 lines · Bruce Richardson
Quoted 19 lines · Bruce Richardson
Quoted 6 lines · Luca Boccassi
Allow users and packagers to override the default dpdk/drivers
subdirectory where the PMDs get installed under $lib.Signed-off-by Luca Boccassi <[email protected]>---
I'm ok with this change, but what is the current location used by
distro's
right now? I mistakenly never checked what was done before I used
dpdk/drivers as a default value, and I'd like the default to match
the
common option if possible.Quoted 2 lines
/Bruce
Replying to my own question, I've just checked on CentOS and Debian,
and it
appears both are using directory "dpdk-pmds" as the subdir name.
Therefore,
let's just make that the default. [Does it need to be configurable in
that
case?]Quoted 1 line
/Bruce
If the default is the one I expect then I'm fine without having an
option (actually happier - less things to configure).But in Debian/Ubuntu it's dpdk-MAJORVER-drivers since last January :-)
We changed because using a single directory creates problems when multiple different ABI versions are installed, due to the EAL autoload
from that directory. So we need a different subdirectory per ABI revision.Quoted 9 lines
We were actually talking with Timothy a while ago to make this consistent across our distros, and perhaps Marco can chip in as well.
Timothy, Marco, is using dpdk-MAJORVER-$something ok for you? I'm not
too fussy on $something, it can be drivers or pmds or something else.Quoted 4 lines
LGTM.
If needed, we can just do a compatibility symlink using the current dpdk-pmds pathOne suggestion/comment. Would using a unique directory per release not lead
to clobbering up the lib directory unnecessarily? How about having a single
"dpdk" or "dpdk-pmds" directory in lib, and having $MAJORVER as a subdir
under that?
Quoted 8 lines
E.g. dpdk/pmds-18.08/, dpdk/pmds-18.11/, or dpdk-pmds/18.08/ dpdk-pmds/18.11
[The former of the above would be my preference, since I don't like having
hypenated names, and like having "dpdk" alone as a folder name :-)]/Bruce
dpdk/pmds-XX.YY/ would work for me. Timothy and Marco?
Signature · 2 lines
Kind regards, Luca Boccassi
Quoted 81 lines · Luca Boccassi
Quoted 80 lines · Bruce Richardson
Quoted 63 lines · Timothy Redaelli
Quoted 50 lines · On Mon, 01 Oct 2018 10:46:02 +0100 Luca Boccassi <[email protected]> wrote:
Quoted 35 lines · Bruce Richardson
Quoted 19 lines · Bruce Richardson
Quoted 6 lines · Luca Boccassi
Allow users and packagers to override the default dpdk/drivers
subdirectory where the PMDs get installed under $lib.Signed-off-by Luca Boccassi <[email protected]>---
I'm ok with this change, but what is the current location used by
distro's
right now? I mistakenly never checked what was done before I used
dpdk/drivers as a default value, and I'd like the default to match
the
common option if possible.Quoted 2 lines
/Bruce
Replying to my own question, I've just checked on CentOS and Debian,
and it
appears both are using directory "dpdk-pmds" as the subdir name.
Therefore,
let's just make that the default. [Does it need to be configurable in
that
case?]Quoted 1 line
/Bruce
If the default is the one I expect then I'm fine without having an
option (actually happier - less things to configure).But in Debian/Ubuntu it's dpdk-MAJORVER-drivers since last January :-)
We changed because using a single directory creates problems when multiple different ABI versions are installed, due to the EAL autoload
from that directory. So we need a different subdirectory per ABI revision.Quoted 9 lines
We were actually talking with Timothy a while ago to make this consistent across our distros, and perhaps Marco can chip in as well.
Timothy, Marco, is using dpdk-MAJORVER-$something ok for you? I'm not
too fussy on $something, it can be drivers or pmds or something else.Quoted 4 lines
LGTM.
If needed, we can just do a compatibility symlink using the current dpdk-pmds pathOne suggestion/comment. Would using a unique directory per release not lead
to clobbering up the lib directory unnecessarily? How about having a single
"dpdk" or "dpdk-pmds" directory in lib, and having $MAJORVER as a subdir
under that?E.g. dpdk/pmds-18.08/, dpdk/pmds-18.11/, or dpdk-pmds/18.08/ dpdk-pmds/18.11
Quoted 7 lines
Quoted 5 lines
[The former of the above would be my preference, since I don't like having
hypenated names, and like having "dpdk" alone as a folder name :-)]/Bruce
dpdk/pmds-XX.YY/ would work for me. Timothy and Marco?
That would work for us.
However, I would suggest to have the path to be configurable (feature to be dropped in maybe next release). Just to make sure the transition can happen without pain in the remote circumstance that something goes wrong with packaging...
Quoted 1 line
Signature · 4 lines
Marco V SUSE LINUX GmbH | GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Maxfeldstr. 5, D-90409, Nürnberg
Quoted 88 lines · Marco Varlese
Quoted 87 lines · Luca Boccassi
Quoted 85 lines · Bruce Richardson
Quoted 63 lines · Timothy Redaelli
Quoted 50 lines · On Mon, 01 Oct 2018 10:46:02 +0100 Luca Boccassi <[email protected]> wrote:
Quoted 35 lines · Bruce Richardson
Quoted 19 lines · Bruce Richardson
Quoted 6 lines · Luca Boccassi
Allow users and packagers to override the default dpdk/drivers
subdirectory where the PMDs get installed under $lib.Signed-off-by Luca Boccassi <[email protected]>---
I'm ok with this change, but what is the current location used by
distro's
right now? I mistakenly never checked what was done before I used
dpdk/drivers as a default value, and I'd like the default to match
the
common option if possible.Quoted 2 lines
/Bruce
Replying to my own question, I've just checked on CentOS and Debian,
and it
appears both are using directory "dpdk-pmds" as the subdir name.
Therefore,
let's just make that the default. [Does it need to be configurable in
that
case?]Quoted 1 line
/Bruce
If the default is the one I expect then I'm fine without having an
option (actually happier - less things to configure).But in Debian/Ubuntu it's dpdk-MAJORVER-drivers since last January :-)
We changed because using a single directory creates problems when multiple different ABI versions are installed, due to the EAL autoload
from that directory. So we need a different subdirectory per ABI revision.Quoted 9 lines
We were actually talking with Timothy a while ago to make this consistent across our distros, and perhaps Marco can chip in as well.
Timothy, Marco, is using dpdk-MAJORVER-$something ok for you? I'm not
too fussy on $something, it can be drivers or pmds or something else.Quoted 4 lines
LGTM.
If needed, we can just do a compatibility symlink using the current dpdk-pmds pathOne suggestion/comment. Would using a unique directory per release not lead
to clobbering up the lib directory unnecessarily? How about having a single
"dpdk" or "dpdk-pmds" directory in lib, and having $MAJORVER as a subdir
under that?E.g. dpdk/pmds-18.08/, dpdk/pmds-18.11/, or dpdk-pmds/18.08/ dpdk-pmds/18.11
[The former of the above would be my preference, since I don't like having
hypenated names, and like having "dpdk" alone as a folder name :-)]/Bruce
Quoted 10 lines
Quoted 1 line
dpdk/pmds-XX.YY/ would work for me. Timothy and Marco?
That would work for us.
However, I would suggest to have the path to be configurable (feature to be dropped in maybe next release). Just to make sure the transition can happen without pain in the remote circumstance that something goes wrong with packaging...Quoted 1 line
Signature · 1 line
Marco V
Yes, I think it needs to be configurable for the forseeable future. If the DPDK version is to be put in the path then we either need to always use a configurable version, since we can't hardcode a version number in the default, or else we need to put logic in the meson.build file to always insert a version number.
/Bruce
Quoted 135 lines · Bruce Richardson
Quoted 121 lines · Marco Varlese
Quoted 106 lines · Luca Boccassi
Quoted 105 lines · Bruce Richardson
Quoted 77 lines · Timothy Redaelli
Quoted 66 lines · On Mon, 01 Oct 2018 10:46:02 +0100 Luca Boccassi <[email protected]> wrote:
Quoted 41 lines · Bruce Richardson
Quoted 22 lines · Bruce Richardson
Quoted 6 lines · Luca Boccassi
Allow users and packagers to override the default dpdk/drivers
subdirectory where the PMDs get installed under $lib.Signed-off-by Luca Boccassi <[email protected]>---
I'm ok with this change, but what is the current location
used by
distro's
right now? I mistakenly never checked what was done before I
used
dpdk/drivers as a default value, and I'd like the default to
match
the
common option if possible.Quoted 2 lines
/Bruce
Replying to my own question, I've just checked on CentOS and
Debian,
and it
appears both are using directory "dpdk-pmds" as the subdir
name.
Therefore,
let's just make that the default. [Does it need to be configurable in
that
case?]Quoted 1 line
/Bruce
If the default is the one I expect then I'm fine without having
an
option (actually happier - less things to configure).But in Debian/Ubuntu it's dpdk-MAJORVER-drivers since last January :-)
We changed because using a single directory creates problems when
multiple different ABI versions are installed, due to the EAL
autoload
from that directory. So we need a different subdirectory per ABI
revision.We were actually talking with Timothy a while ago to make this
consistent across our distros, and perhaps Marco can chip in as
well.Quoted 7 lines
Timothy, Marco, is using dpdk-MAJORVER-$something ok for you? I'm
not
too fussy on $something, it can be drivers or pmds or something
else.Quoted 5 lines
LGTM.
If needed, we can just do a compatibility symlink using the current
dpdk-pmds pathOne suggestion/comment. Would using a unique directory per release
not lead
to clobbering up the lib directory unnecessarily? How about having a
single
"dpdk" or "dpdk-pmds" directory in lib, and having $MAJORVER as a
subdir
under that?E.g. dpdk/pmds-18.08/, dpdk/pmds-18.11/, or dpdk-pmds/18.08/ dpdk-pmds/18.11
[The former of the above would be my preference, since I don't like
having
hypenated names, and like having "dpdk" alone as a folder name :-)]Quoted 3 lines
Quoted 1 line
/Bruce
dpdk/pmds-XX.YY/ would work for me. Timothy and Marco?
That would work for us.
However, I would suggest to have the path to be configurable (feature to be
dropped in maybe next release). Just to make sure the transition can happen
without pain in the remote circumstance that something goes wrong with
packaging...Quoted 1 line
Quoted 3 lines
--
Marco VYes, I think it needs to be configurable for the forseeable future. If the
DPDK version is to be put in the path then we either need to always use a
configurable version, since we can't hardcode a version number in the default, or else we need to put logic in the meson.build file to always
insert a version number.
Quoted 1 line
/Bruce
Ok, in v2 I added a small bit of logic to set the default to the major version number (and also the override option).
Signature · 2 lines
Kind regards, Luca Boccassi
PATCH v2 1/2 build: change default PMD installation subdir to dpdk/pmds-XX.YY
In reply to Luca BoccassiAs part of the effort of consolidating the DPDK installation bits and pieces across distros, set the default directory of lib/ where PMDs get installed to dpdk/pmds-XX.YY. It's necessary to have a versioned subdirectory as multiple ABI revisions might be installed at the same time, so having a fixed name will cause trouble with the autoload feature.
Small refactor with parsing and saving the major version to a variable, since it's now used in 3 different places.
--- drivers/meson.build | 6 ++---- lib/meson.build | 6 ++---- meson.build | 8 +++++++- 3 files changed, 11 insertions(+), 9 deletions(-)
drivers/meson.build +2 -4
@@ -98,10 +98,8 @@ foreach class:driver_classes lib_version = '@[email protected]'.format(version) so_version = '@0@'.format(version) else - pver = meson.project_version().split('.') - lib_version = '@0@.@1@'.format(pver.get(0), - pver.get(1)) - so_version = lib_version + lib_version = major_version + so_version = major_version endif # now build the static driver
lib/meson.build +2 -4
@@ -88,10 +88,8 @@ foreach l:libraries lib_version = '@[email protected]'.format(version) so_version = '@0@'.format(version) else - prj_ver = meson.project_version().split('.') - lib_version = '@0@.@1@'.format( - prj_ver.get(0), prj_ver.get(1)) - so_version = lib_version + lib_version = major_version + so_version = major_version endif # first build static lib
meson.build +7 -1
@@ -15,7 +15,13 @@ dpdk_libraries = [] dpdk_drivers = [] dpdk_extra_ldflags = [] -driver_install_path = join_paths(get_option('libdir'), 'dpdk/drivers') +# 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)) + +driver_install_path = join_paths(get_option('libdir'), 'dpdk', + 'pmds-' + major_version) eal_pmd_path = join_paths(get_option('prefix'), driver_install_path) # configure the build, and make sure configs here and in config folder are
Signature · 1 line
2.19.0
PATCH v2 2/2 build: add drivers_install_subdir meson option
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
--- meson.build | 10 ++++++++-- meson_options.txt | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-)
meson.build +8 -2
@@ -20,8 +20,14 @@ dpdk_extra_ldflags = [] pver = meson.project_version().split('.') major_version = '@0@.@1@'.format(pver.get(0), pver.get(1)) -driver_install_path = join_paths(get_option('libdir'), 'dpdk', - 'pmds-' + major_version) +pmd_subdir_opt = get_option('drivers_install_subdir') +if pmd_subdir_opt == 'dpdk/pmds-XX.YY' + driver_install_path = join_paths(get_option('libdir'), + 'dpdk', 'pmds-' + major_version) +else + driver_install_path = join_paths(get_option('libdir'), + pmd_subdir_opt) +endif eal_pmd_path = join_paths(get_option('prefix'), driver_install_path) # configure the build, and make sure configs here and in config folder are
meson_options.txt +2 -0
@@ -1,5 +1,7 @@ option('allow_invalid_socket_id', type: 'boolean', value: false, description: 'allow out-of-range NUMA socket id\'s for platforms that don\'t report the value correctly') +option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-XX.YY', + description: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.') option('enable_driver_mlx_glue', type: 'boolean', value: false, description: 'Enable glue library for Mellanox PMDs') option('enable_kmods', type: 'boolean', value: true,
Signature · 1 line
2.19.0
Quoted 17 lines · Luca Boccassi
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
Signed-off-by Luca Boccassi <[email protected]>--- meson.build | 10 ++++++++-- meson_options.txt | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-)meson.build +0
-0@@ -20,8 +20,14 @@ dpdk_extra_ldflags = [] pver = meson.project_version().split('.') major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
meson.build dpdk_extra_ldflags = [] · line 30
Quoted 10 lines
meson.build +8
-2-driver_install_path = join_paths(get_option('libdir'), 'dpdk', - 'pmds-' + major_version) +pmd_subdir_opt = get_option('drivers_install_subdir') +if pmd_subdir_opt == 'dpdk/pmds-XX.YY' + driver_install_path = join_paths(get_option('libdir'), + 'dpdk', 'pmds-' + major_version) +else + driver_install_path = join_paths(get_option('libdir'), + pmd_subdir_opt) +endif
Not sure I like this degree of hard-coding of paths. While meson doesn't have a string replace function, we can still use "sed" via run_command to perform some substitution, or else get a little creative using split if it can be made work. That would allow us to put in e.g "<VERSION>" as a generic placeholder in the text.
/Bruce
Quoted 38 lines · Bruce Richardson
Quoted 17 lines · Luca Boccassi
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
Signed-off-by Luca Boccassi <[email protected]>---
meson.build | 10 ++++++++--
meson_options.txt | 2 ++2 files changed, 10 insertions(+), 2 deletions(-)meson.build +0
-0@@ -20,8 +20,14 @@ dpdk_extra_ldflags = [] pver = meson.project_version().split('.') major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))meson.build dpdk_extra_ldflags = [] · line 30
Quoted 10 lines
meson.build +8
-2-driver_install_path = join_paths(get_option('libdir'), 'dpdk', - 'pmds-' + major_version) +pmd_subdir_opt = get_option('drivers_install_subdir') +if pmd_subdir_opt == 'dpdk/pmds-XX.YY' + driver_install_path = join_paths(get_option('libdir'), + 'dpdk', 'pmds-' + major_version) +else + driver_install_path = join_paths(get_option('libdir'), + pmd_subdir_opt) +endifNot sure I like this degree of hard-coding of paths. While meson doesn't
have a string replace function, we can still use "sed" viarun_commandto
perform some substitution, or else get a little creative using split if it
can be made work. That would allow us to put in e.g "<VERSION>" as a generic placeholder in the text.
Quoted 1 line
/Bruce
Do you mean for the "if pmd_subdir_opt == 'dpdk/pmds-XX.YY'" bit? I can change that to "== 'dpdk/pmds-<VERSION>'" if you prefer?
Signature · 2 lines
Kind regards, Luca Boccassi
Quoted 39 lines · Luca Boccassi
Quoted 38 lines · Bruce Richardson
Quoted 17 lines · Luca Boccassi
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
Signed-off-by Luca Boccassi <[email protected]>---
meson.build | 10 ++++++++--
meson_options.txt | 2 ++2 files changed, 10 insertions(+), 2 deletions(-)meson.build +0
-0@@ -20,8 +20,14 @@ dpdk_extra_ldflags = [] pver = meson.project_version().split('.') major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))meson.build dpdk_extra_ldflags = [] · line 30
Quoted 10 lines
meson.build +8
-2-driver_install_path = join_paths(get_option('libdir'), 'dpdk', - 'pmds-' + major_version) +pmd_subdir_opt = get_option('drivers_install_subdir') +if pmd_subdir_opt == 'dpdk/pmds-XX.YY' + driver_install_path = join_paths(get_option('libdir'), + 'dpdk', 'pmds-' + major_version) +else + driver_install_path = join_paths(get_option('libdir'), + pmd_subdir_opt) +endifNot sure I like this degree of hard-coding of paths. While meson doesn't
have a string replace function, we can still use "sed" viarun_commandto
perform some substitution, or else get a little creative using split if it
can be made work. That would allow us to put in e.g "<VERSION>" as a generic placeholder in the text.
Quoted 5 lines
Quoted 1 line
/Bruce
Do you mean for the "if
pmd_subdir_opt== 'dpdk/pmds-XX.YY'" bit? I can change that to "== 'dpdk/pmds-<VERSION>'" if you prefer?
Yes, though I was more thinking of:
"if pmd_subdir_opt.contains('<VERSION>')" ...rather than matching on the whole string.
/Bruce
Quoted 49 lines · Bruce Richardson
Quoted 41 lines · Luca Boccassi
Quoted 40 lines · Bruce Richardson
Quoted 17 lines · Luca Boccassi
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
Signed-off-by Luca Boccassi <[email protected]>---
meson.build | 10 ++++++++--
meson_options.txt | 2 ++2 files changed, 10 insertions(+), 2 deletions(-)meson.build +0
-0@@ -20,8 +20,14 @@ dpdk_extra_ldflags = [] pver = meson.project_version().split('.') major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))meson.build dpdk_extra_ldflags = [] · line 30
Quoted 10 lines
meson.build +8
-2-driver_install_path = join_paths(get_option('libdir'), 'dpdk', - 'pmds-' + major_version) +pmd_subdir_opt = get_option('drivers_install_subdir') +if pmd_subdir_opt == 'dpdk/pmds-XX.YY' + driver_install_path = join_paths(get_option('libdir'), + 'dpdk', 'pmds-' + major_version) +else + driver_install_path = join_paths(get_option('libdir'), + pmd_subdir_opt) +endifNot sure I like this degree of hard-coding of paths. While meson doesn't
have a string replace function, we can still use "sed" viarun_commandto
perform some substitution, or else get a little creative using split
if it
can be made work. That would allow us to put in e.g "<VERSION>" as a
generic placeholder in the text.Quoted 6 lines
Quoted 1 line
/Bruce
Do you mean for the "if
pmd_subdir_opt== 'dpdk/pmds-XX.YY'" bit? I can
change that to "== 'dpdk/pmds-<VERSION>'" if you prefer?
Quoted 5 lines
Yes, though I was more thinking of:
"if pmd_subdir_opt.contains('<VERSION>')" ...rather than matching on the whole string.
/Bruce
Ok, fixed in v3
Signature · 2 lines
Kind regards, Luca Boccassi
PATCH v3 1/2 build: change default PMD installation subdir to dpdk/pmds-XX.YY
In reply to Luca BoccassiAs part of the effort of consolidating the DPDK installation bits and pieces across distros, set the default directory of lib/ where PMDs get installed to dpdk/pmds-XX.YY. It's necessary to have a versioned subdirectory as multiple ABI revisions might be installed at the same time, so having a fixed name will cause trouble with the autoload feature.
Small refactor with parsing and saving the major version to a variable, since it's now used in 3 different places.
--- drivers/meson.build | 6 ++---- lib/meson.build | 6 ++---- meson.build | 8 +++++++- 3 files changed, 11 insertions(+), 9 deletions(-)
drivers/meson.build +2 -4
@@ -98,10 +98,8 @@ foreach class:driver_classes lib_version = '@[email protected]'.format(version) so_version = '@0@'.format(version) else - pver = meson.project_version().split('.') - lib_version = '@0@.@1@'.format(pver.get(0), - pver.get(1)) - so_version = lib_version + lib_version = major_version + so_version = major_version endif # now build the static driver
lib/meson.build +2 -4
@@ -88,10 +88,8 @@ foreach l:libraries lib_version = '@[email protected]'.format(version) so_version = '@0@'.format(version) else - prj_ver = meson.project_version().split('.') - lib_version = '@0@.@1@'.format( - prj_ver.get(0), prj_ver.get(1)) - so_version = lib_version + lib_version = major_version + so_version = major_version endif # first build static lib
meson.build +7 -1
@@ -15,7 +15,13 @@ dpdk_libraries = [] dpdk_drivers = [] dpdk_extra_ldflags = [] -driver_install_path = join_paths(get_option('libdir'), 'dpdk/drivers') +# 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)) + +driver_install_path = join_paths(get_option('libdir'), 'dpdk', + 'pmds-' + major_version) eal_pmd_path = join_paths(get_option('prefix'), driver_install_path) # configure the build, and make sure configs here and in config folder are
Signature · 1 line
2.19.0
PATCH v3 2/2 build: add drivers_install_subdir meson option
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
---
v3: changed default value to <VERSION> and use string.contains rather
than exact equivalence
meson.build | 10 ++++++++-- meson_options.txt | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-)
meson.build +8 -2
@@ -20,8 +20,14 @@ dpdk_extra_ldflags = [] pver = meson.project_version().split('.') major_version = '@0@.@1@'.format(pver.get(0), pver.get(1)) -driver_install_path = join_paths(get_option('libdir'), 'dpdk', - 'pmds-' + major_version) +pmd_subdir_opt = get_option('drivers_install_subdir') +if pmd_subdir_opt.contains('<VERSION>') + driver_install_path = join_paths(get_option('libdir'), + 'dpdk', 'pmds-' + major_version) +else + driver_install_path = join_paths(get_option('libdir'), + pmd_subdir_opt) +endif eal_pmd_path = join_paths(get_option('prefix'), driver_install_path) # configure the build, and make sure configs here and in config folder are
meson_options.txt +2 -0
@@ -1,5 +1,7 @@ option('allow_invalid_socket_id', type: 'boolean', value: false, description: 'allow out-of-range NUMA socket id\'s for platforms that don\'t report the value correctly') +option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', + description: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.') option('enable_driver_mlx_glue', type: 'boolean', value: false, description: 'Enable glue library for Mellanox PMDs') option('enable_kmods', type: 'boolean', value: true,
Signature · 1 line
2.19.0
Quoted 22 lines · Luca Boccassi
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
Signed-off-by Luca Boccassi <[email protected]>---
v3: changed default value to <VERSION> and use string.contains rather
than exact equivalencemeson.build | 10 ++++++++-- meson_options.txt | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-)meson.build +0
-2@@ -20,8 +20,14 @@ dpdk_extra_ldflags = [] pver = meson.project_version().split('.') major_version = '@0@.@1@'.format(pver.get(0), pver.get(1)) -driver_install_path = join_paths(get_option('libdir'), 'dpdk', - 'pmds-' + major_version)
meson.build dpdk_extra_ldflags = [] · line 32
Quoted 10 lines
meson.build +8
-0+pmd_subdir_opt = get_option('drivers_install_subdir') +if pmd_subdir_opt.contains('<VERSION>') + driver_install_path = join_paths(get_option('libdir'), + 'dpdk', 'pmds-' + major_version) +else + driver_install_path = join_paths(get_option('libdir'), + pmd_subdir_opt) +endif eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
The diff (to your patch) below demonstrates more of what I had in mind :-) Basically do a replace of '<VERSION>' with the version number, leaving the remaining string unchanged.
/Bruce
meson.build +2 -5
@@ -22,12 +22,9 @@ major_version = '@0@.@1@'.format(pver.get(0), pver.get(1)) pmd_subdir_opt = get_option('drivers_install_subdir') if pmd_subdir_opt.contains('<VERSION>') - driver_install_path = join_paths(get_option('libdir'), - 'dpdk', 'pmds-' + major_version) -else - driver_install_path = join_paths(get_option('libdir'), - pmd_subdir_opt) + pmd_subdir_opt = major_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) # configure the build, and make sure configs here and in config folder are
Quoted 65 lines · Bruce Richardson
Quoted 31 lines · Luca Boccassi
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
Signed-off-by Luca Boccassi <[email protected]>---
v3: changed default value to <VERSION> and use string.contains rather
than exact equivalencemeson.build | 10 ++++++++--
meson_options.txt | 2 ++2 files changed, 10 insertions(+), 2 deletions(-)meson.build +0
-0@@ -20,8 +20,14 @@ dpdk_extra_ldflags = [] pver = meson.project_version().split('.') major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))meson.build +8
-2-driver_install_path = join_paths(get_option('libdir'), 'dpdk', - 'pmds-' + major_version) +pmd_subdir_opt = get_option('drivers_install_subdir') +if pmd_subdir_opt.contains('<VERSION>') + driver_install_path = join_paths(get_option('libdir'), + 'dpdk', 'pmds-' + major_version) +else + driver_install_path = join_paths(get_option('libdir'), + pmd_subdir_opt) +endifQuoted 3 lines
eal_pmd_path = join_paths(get_option('prefix'),
driver_install_path)The diff (to your patch) below demonstrates more of what I had in mind :-)
Basically do a replace of '<VERSION>' with the version number, leaving the
remaining string unchanged./Bruce
meson.build +0
-0@@ -22,12 +22,9 @@ major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
pmd_subdir_opt =get_option('drivers_install_subdir')ifpmd_subdir_opt.contains('<VERSION>')meson.build +1
-5- driver_install_path = join_paths(get_option('libdir'), - 'dpdk', 'pmds-' + major_version) -else - driver_install_path = join_paths(get_option('libdir'), - pmd_subdir_opt) + pmd_subdir_opt =major_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)
Quoted 2 lines
# configure the build, and make sure configs here and in config folder are
Ok, pushed in v4
Signature · 2 lines
Kind regards, Luca Boccassi
PATCH v4 1/2 build: change default PMD installation subdir to dpdk/pmds-XX.YY
In reply to Luca BoccassiAs part of the effort of consolidating the DPDK installation bits and pieces across distros, set the default directory of lib/ where PMDs get installed to dpdk/pmds-XX.YY. It's necessary to have a versioned subdirectory as multiple ABI revisions might be installed at the same time, so having a fixed name will cause trouble with the autoload feature.
Small refactor with parsing and saving the major version to a variable, since it's now used in 3 different places.
--- drivers/meson.build | 6 ++---- lib/meson.build | 6 ++---- meson.build | 8 +++++++- 3 files changed, 11 insertions(+), 9 deletions(-)
drivers/meson.build +2 -4
@@ -98,10 +98,8 @@ foreach class:driver_classes lib_version = '@[email protected]'.format(version) so_version = '@0@'.format(version) else - pver = meson.project_version().split('.') - lib_version = '@0@.@1@'.format(pver.get(0), - pver.get(1)) - so_version = lib_version + lib_version = major_version + so_version = major_version endif # now build the static driver
lib/meson.build +2 -4
@@ -88,10 +88,8 @@ foreach l:libraries lib_version = '@[email protected]'.format(version) so_version = '@0@'.format(version) else - prj_ver = meson.project_version().split('.') - lib_version = '@0@.@1@'.format( - prj_ver.get(0), prj_ver.get(1)) - so_version = lib_version + lib_version = major_version + so_version = major_version endif # first build static lib
meson.build +7 -1
@@ -15,7 +15,13 @@ dpdk_libraries = [] dpdk_drivers = [] dpdk_extra_ldflags = [] -driver_install_path = join_paths(get_option('libdir'), 'dpdk/drivers') +# 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)) + +driver_install_path = join_paths(get_option('libdir'), 'dpdk', + 'pmds-' + major_version) eal_pmd_path = join_paths(get_option('prefix'), driver_install_path) # configure the build, and make sure configs here and in config folder are
Signature · 1 line
2.19.0
PATCH v4 2/2 build: add drivers_install_subdir meson option
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
---
v3: changed default value to <VERSION> and use string.contains rather
than exact equivalence
v4: further optimisations suggested by review
meson.build | 7 +++++-- meson_options.txt | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-)
meson.build +5 -2
@@ -20,8 +20,11 @@ dpdk_extra_ldflags = [] pver = meson.project_version().split('.') major_version = '@0@.@1@'.format(pver.get(0), pver.get(1)) -driver_install_path = join_paths(get_option('libdir'), 'dpdk', - 'pmds-' + major_version) +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>')) +endif +driver_install_path = join_paths(get_option('libdir'), pmd_subdir_opt) eal_pmd_path = join_paths(get_option('prefix'), driver_install_path) # configure the build, and make sure configs here and in config folder are
meson_options.txt +2 -0
@@ -1,5 +1,7 @@ option('allow_invalid_socket_id', type: 'boolean', value: false, description: 'allow out-of-range NUMA socket id\'s for platforms that don\'t report the value correctly') +option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', + description: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.') option('enable_driver_mlx_glue', type: 'boolean', value: false, description: 'Enable glue library for Mellanox PMDs') option('enable_kmods', type: 'boolean', value: true,
Signature · 1 line
2.19.0
Quoted 5 lines · Luca Boccassi
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
Signed-off-by Luca Boccassi <[email protected]>---
Quoted 5 lines · On Tue, 2 Oct 2018 17:20:46 +0100 Luca Boccassi <[email protected]> wrote:
Allow users and packagers to override the default dpdk/drivers subdirectory where the PMDs get installed under $lib.
Signed-off-by Luca Boccassi <[email protected]>---
Re: [PATCH v4 1/2] build: change default PMD installation subdir to dpdk/pmds-XX.YY
In reply to Luca BoccassiQuoted 11 lines · Luca Boccassi
As part of the effort of consolidating the DPDK installation bits and pieces across distros, set the default directory of
lib/where PMDs get installed to dpdk/pmds-XX.YY. It's necessary to have a versioned subdirectory as multiple ABI revisions might be installed at the same time, so having a fixed name will cause trouble with the autoload feature.
Small refactor with parsing and saving the major version to a variable, since it's now used in 3 different places.Signed-off-by Luca Boccassi <[email protected]>---
Re: [PATCH v4 1/2] build: change default PMD installation subdir to dpdk/pmds-XX.YY
In reply to Luca BoccassiQuoted 11 lines · On Tue, 2 Oct 2018 17:20:45 +0100 Luca Boccassi <[email protected]> wrote:
As part of the effort of consolidating the DPDK installation bits and pieces across distros, set the default directory of
lib/where PMDs get installed to dpdk/pmds-XX.YY. It's necessary to have a versioned subdirectory as multiple ABI revisions might be installed at the same time, so having a fixed name will cause trouble with the autoload feature.
Small refactor with parsing and saving the major version to a variable, since it's now used in 3 different places.Signed-off-by Luca Boccassi <[email protected]>---
Re: [PATCH v4 1/2] build: change default PMD installation subdir to dpdk/pmds-XX.YY
In reply to Luca Boccassi02/10/2018 18:20, Luca Boccassi:
Quoted 10 lines
As part of the effort of consolidating the DPDK installation bits and pieces across distros, set the default directory of
lib/where PMDs get installed to dpdk/pmds-XX.YY. It's necessary to have a versioned subdirectory as multiple ABI revisions might be installed at the same time, so having a fixed name will cause trouble with the autoload feature.
Small refactor with parsing and saving the major version to a variable, since it's now used in 3 different places.Signed-off-by Luca Boccassi <[email protected]>
Series applied, thanks