build: add backward compatibility for nested drivers
PATCH v2 1/2 build: add backward compatibility for nested drivers
Intel driver were moved from 'net/*' to '/net/intel/*' in DPDK 25.03 in commitc1d145834f28 ("net/intel: move Intel drivers to a subdirectory")
This means that any enabling or disabling of those drivers from the command line using the old names will no longer work. e.g. 'net/ixgbe' will not enable/disable the ixgbe driver.
The drivers enabled or disabled are reported in the meson logs, but it is easy to miss this change in the list of drivers and end up with a build missing drivers or drivers unintentionally enabled.
It also means that any users working with different versions of DPDK have to enable/disable drivers differently depending on the DPDK version.
To avoid the issues above, add backwards compatibility for old Intel driver names with a warning. It can be extended for other drivers if the need arises.
--- drivers/meson.build | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-)
drivers/meson.build +35 -5
@@ -33,10 +33,40 @@ if meson.is_cross_build() endif -# add cmdline disabled drivers and meson disabled drivers together -disable_drivers += ',' + get_option('disable_drivers') +# map legacy driver names +driver_map = { + 'net/e1000': 'net/intel/e1000', + 'net/fm10k': 'net/intel/fm10k', + 'net/i40e': 'net/intel/i40e', + 'net/iavf': 'net/intel/iavf', + 'net/ice': 'net/intel/ice', + 'net/idpf': 'net/intel/idpf', + 'net/ipn3ke': 'net/intel/ipn3ke', + 'net/ixgbe': 'net/intel/ixgbe', + 'net/cpfl': 'net/intel/cpfl', +} + +# add cmdline drivers +foreach driver_type : [['disable', get_option('disable_drivers')], + ['enable', get_option('enable_drivers')]] + driver_list_name = driver_type[0] + '_drivers' + cmdline_drivers = ',' + driver_type[1] + + foreach driver : cmdline_drivers.split(',') + if driver_map.has_key(driver) + driver_mapped = driver_map[driver] + warning('Driver name "@0@" is deprecated, please use "@1@" instead.' + .format(driver, driver_mapped)) + driver = driver_mapped + endif + if driver_list_name == 'disable_drivers' + disable_drivers += ',' + driver + else + enable_drivers += ',' + driver + endif + endforeach +endforeach + +# add cmdline drivers and meson drivers together disable_drivers = run_command(list_dir_globs, disable_drivers, check: true).stdout().split() - -# add cmdline enabled drivers and meson enabled drivers together -enable_drivers = ',' + get_option('enable_drivers') enable_drivers = run_command(list_dir_globs, enable_drivers, check: true).stdout().split() require_drivers = true
Signature · 1 line
2.51.0
PATCH v2 2/2 build: add backwards compatibility for wildcarding nested drivers
Up until DPDK 25.03 'net/*' could be used with meson options enable_drivers or disable_drivers to explicitly enable or disable all net drivers.
In DPDK 25.03 commitc1d145834f28 ("net/intel: move Intel drivers to a subdirectory") moved Intel drivers to 'net/intel/*' and 'net/*' no longer enabled or disabled the Intel drivers.
Expand wildcards handling to include nested drivers. e.g. 'net/*' will also enable/disable drivers in 'net/*/*'
This adds backwards compatibility so that so that 'net/*' will continue to enable/disable Intel and any future nested drivers.
--- drivers/meson.build | 5 +++++ 1 file changed, 5 insertions(+)
drivers/meson.build +5 -0
@@ -58,4 +58,9 @@ foreach driver_type : [['disable', get_option('disable_drivers')], .format(driver, driver_mapped)) driver = driver_mapped + elif driver.contains('*') + if driver.endswith('/*') and not driver.contains('/*/*') + # for wildcard add nested wildcard + driver = driver + ',' + driver + '/*' + endif endif if driver_list_name == 'disable_drivers'
Signature · 1 line
2.51.0
Re: [PATCH 2/2] build: add backwards compatibility for wildcarding nested drivers
22/09/2025 13:07, Kevin Traynor:
Quoted 25 lines
Up until DPDK 25.03 '
net/*' could be used with meson optionsenable_driversordisable_driversto explicitly enable or disable all net drivers.In DPDK 25.03 commit
c1d145834f28("net/intel: move Intel drivers to a subdirectory") moved Intel drivers to 'net/intel/*' and 'net/*' no longer enabled or disabled the Intel drivers.Expand wildcards handling to include nested drivers. e.g. '
net/*' will also enable/disable drivers in 'net/*/*'This adds backwards compatibility so that so that '
net/*' will continue to enable/disable Intel and any future nested drivers.Signed-off-by Kevin Traynor <[email protected]>--- drivers/meson.build | 5 +++++ 1 file changed, 5 insertions(+)drivers/meson.build +0
-0
drivers/meson.build foreach driver_type : [['disable', get_option('disable_drivers')], · line 64
Quoted 7 lines
drivers/meson.build +5
-0@@ -58,4 +58,9 @@ foreach driver_type : [['disable', get_option('disable_drivers')], .format(driver, driver_mapped)) driver = driver_mapped + elif driver.contains('*') + if driver.endswith('/*') and not driver.contains('/*/*') + # for wildcard add nested wildcard + driver = driver + ',' + driver + '/*' + endif
The special pattern ** does not work in Meson?
Re: [PATCH 2/2] build: add backwards compatibility for wildcarding nested drivers
Quoted 21 lines · Thomas Monjalon
22/09/2025 13:07, Kevin Traynor:
Quoted 20 lines
Up until DPDK 25.03 '
net/*' could be used with meson optionsenable_driversordisable_driversto explicitly enable or disable all net drivers.In DPDK 25.03 commit
c1d145834f28("net/intel: move Intel drivers to a subdirectory") moved Intel drivers to 'net/intel/*' and 'net/*' no longer enabled or disabled the Intel drivers.Expand wildcards handling to include nested drivers. e.g. '
net/*' will also enable/disable drivers in 'net/*/*'This adds backwards compatibility so that so that '
net/*' will continue to enable/disable Intel and any future nested drivers.Signed-off-by Kevin Traynor <[email protected]>--- drivers/meson.build | 5 +++++ 1 file changed, 5 insertions(+)
Quoted 16 lines
drivers/meson.build foreach driver_type : [['disable', get_option('disable_drivers')], · line 64
Quoted 12 lines
drivers/meson.build +5
-0@@ -58,4 +58,9 @@ foreach driver_type : [['disable', get_option('disable_drivers')], .format(driver, driver_mapped)) driver = driver_mapped + elif driver.contains('*') + if driver.endswith('/*') and not driver.contains('/*/*') + # for wildcard add nested wildcard + driver = driver + ',' + driver + '/*' + endifThe special pattern ** does not work in Meson?
I will check, thanks.
22/09/2025 13:07, Kevin Traynor:
Quoted 6 lines
drivers/meson.build +2
-2-# add cmdline disabled drivers and meson disabled drivers together -disable_drivers += ',' + get_option('disable_drivers') +# map legacy driver names +driver_map = {
drivers/meson.build if meson.is_cross_build() · line 46
Quoted 10 lines
drivers/meson.build +10
-0+ 'net/e1000': 'net/intel/e1000', + 'net/fm10k': 'net/intel/fm10k', + 'net/i40e': 'net/intel/i40e', + 'net/iavf': 'net/intel/iavf', + 'net/ice': 'net/intel/ice', + 'net/idpf': 'net/intel/idpf', + 'net/ipn3ke': 'net/intel/ipn3ke', + 'net/ixgbe': 'net/intel/ixgbe', + 'net/cpfl': 'net/intel/cpfl', +}
Should we build this list inside a file drivers/net/intel/meson.build ? I'm not sure my idea is better...
drivers/meson.build if meson.is_cross_build() · line 55
Quoted 9 lines
drivers/meson.build +9
-0+ +# add cmdline drivers +foreach driver_type : [['disable', get_option('disable_drivers')], + ['enable', get_option('enable_drivers')]] + driver_list_name = driver_type[0] + '_drivers' + cmdline_drivers = ',' + driver_type[1] + + foreach driver : cmdline_drivers.split(',') + if driver_map.has_key(driver)
I feel we need comments for above parsing.
drivers/meson.build if meson.is_cross_build() · line 57
Quoted 2 lines
drivers/meson.build +2
-0+ driver_mapped = driver_map[driver] + warning('Driver name "@0@" is deprecated, please use "@1@" instead.'
Not sure about this warning.
We can keep compatibility without saying it is deprecated.
drivers/meson.build if meson.is_cross_build() · line 69
Quoted 12 lines
drivers/meson.build +12
-0+ .format(driver, driver_mapped)) + driver = driver_mapped + endif + if driver_list_name == 'disable_drivers' + disable_drivers += ',' + driver + else + enable_drivers += ',' + driver + endif + endforeach +endforeach + +# add cmdline drivers and meson drivers together
This comment is not clear.
Quoted 4 lines
disable_drivers=run_command(list_dir_globs, disable_drivers, check: true).stdout().split()drivers/meson.build +0
-3- -# add cmdline enabled drivers and meson enabled drivers together -enable_drivers = ',' + get_option('enable_drivers')
Quoted 12 lines · Thomas Monjalon
22/09/2025 13:07, Kevin Traynor:
Quoted 11 lines
drivers/meson.build +7
-2-# add cmdline disabled drivers and meson disabled drivers together -disable_drivers += ',' + get_option('disable_drivers') +# map legacy driver names +driver_map = { + 'net/e1000': 'net/intel/e1000', + 'net/fm10k': 'net/intel/fm10k', + 'net/i40e': 'net/intel/i40e', + 'net/iavf': 'net/intel/iavf', + 'net/ice': 'net/intel/ice',
Quoted 9 lines
drivers/meson.build if meson.is_cross_build() · line 46
Quoted 5 lines
drivers/meson.build +5
-0+ 'net/idpf': 'net/intel/idpf', + 'net/ipn3ke': 'net/intel/ipn3ke', + 'net/ixgbe': 'net/intel/ixgbe', + 'net/cpfl': 'net/intel/cpfl', +}Should we build this list inside a file
drivers/net/intel/meson.build? I'm not sure my idea is better...
Not sure. It's generic as is, so any other driver moved anywhere could add to this list here easily. Let's see what others think.
Quoted 12 lines
drivers/meson.build if meson.is_cross_build() · line 55
Quoted 9 lines
drivers/meson.build +9
-0+ +# add cmdline drivers +foreach driver_type : [['disable', get_option('disable_drivers')], + ['enable', get_option('enable_drivers')]] + driver_list_name = driver_type[0] + '_drivers' + cmdline_drivers = ',' + driver_type[1] + + foreach driver : cmdline_drivers.split(',') + if driver_map.has_key(driver)I feel we need comments for above parsing.
Ack, will add
Quoted 6 lines
drivers/meson.build if meson.is_cross_build() · line 57
Quoted 2 lines
drivers/meson.build +2
-0+ driver_mapped = driver_map[driver] + warning('Driver name "@0@" is deprecated, please use "@1@" instead.'Not sure about this warning.
We can keep compatibility without saying it is deprecated.
Yes, that is a good point for discussion. Seen as support for the legacy names were already dropped and I wasn't aware of any ABI like policy about it, I thought there may be a preference for deprecation warning/continuing to move to the new name only.
I would be happy to keep the legacy name without a warning/deprecation for a longer term and we could adopt this as general guideline by default too. It should not cost much effort to do this.
Another minor point is, if this needs a Fixes tag? Yes, in the sense it feels like it added a banana skin for users (the patches are because I hit this issue with 25.07). I didn't add it for now, as no guarantees were broken and there isn't an upstream stable for backporting to anyway.
Quoted 6 lines
Quoted 6 lines
drivers/meson.build +6
-0+ .format(driver, driver_mapped)) + driver = driver_mapped + endif + if driver_list_name == 'disable_drivers' + disable_drivers += ',' + driver + else
Quoted 9 lines
drivers/meson.build if meson.is_cross_build() · line 69
Quoted 6 lines
drivers/meson.build +6
-0+ enable_drivers += ',' + driver + endif + endforeach +endforeach + +# add cmdline drivers and meson drivers togetherThis comment is not clear.
I will remove this, it was previously for the enable/disable blocks of code, but only relevant to the line that was expanded into the loop above not the below one.
Quoted 6 lines
Quoted 4 lines
disable_drivers=run_command(list_dir_globs, disable_drivers, check: true).stdout().split()drivers/meson.build +0
-3- -# add cmdline enabled drivers and meson enabled drivers together -enable_drivers = ',' + get_option('enable_drivers')
Quoted 23 lines · Kevin Traynor
Quoted 12 lines · Thomas Monjalon
22/09/2025 13:07, Kevin Traynor:
Quoted 11 lines
drivers/meson.build +7
-2-# add cmdline disabled drivers and meson disabled drivers together -disable_drivers += ',' + get_option('disable_drivers') +# map legacy driver names +driver_map = { + 'net/e1000': 'net/intel/e1000', + 'net/fm10k': 'net/intel/fm10k', + 'net/i40e': 'net/intel/i40e', + 'net/iavf': 'net/intel/iavf', + 'net/ice': 'net/intel/ice',Quoted 9 lines
drivers/meson.build if meson.is_cross_build() · line 46
Quoted 5 lines
drivers/meson.build +5
-0+ 'net/idpf': 'net/intel/idpf', + 'net/ipn3ke': 'net/intel/ipn3ke', + 'net/ixgbe': 'net/intel/ixgbe', + 'net/cpfl': 'net/intel/cpfl', +}Should we build this list inside a file
drivers/net/intel/meson.build? I'm not sure my idea is better...
Quoted 3 lines
Not sure. It's generic as is, so any other driver moved anywhere could add to this list here easily. Let's see what others think.
I'm fine either way. Having a general list may be good, as we may have other driver moves or renames in future too.
Quoted 22 lines
Quoted 12 lines
drivers/meson.build if meson.is_cross_build() · line 55
Quoted 9 lines
drivers/meson.build +9
-0+ +# add cmdline drivers +foreach driver_type : [['disable', get_option('disable_drivers')], + ['enable', get_option('enable_drivers')]] + driver_list_name = driver_type[0] + '_drivers' + cmdline_drivers = ',' + driver_type[1] + + foreach driver : cmdline_drivers.split(',') + if driver_map.has_key(driver)I feel we need comments for above parsing.
Ack, will add
Quoted 6 lines
drivers/meson.build if meson.is_cross_build() · line 57
Quoted 2 lines
drivers/meson.build +2
-0+ driver_mapped = driver_map[driver] + warning('Driver name "@0@" is deprecated, please use "@1@" instead.'Not sure about this warning.
We can keep compatibility without saying it is deprecated.
Quoted 9 lines
Yes, that is a good point for discussion. Seen as support for the legacy names were already dropped and I wasn't aware of any ABI like policy about it, I thought there may be a preference for deprecation warning/continuing to move to the new name only.
I would be happy to keep the legacy name without a warning/deprecation for a longer term and we could adopt this as general guideline by default too. It should not cost much effort to do this.
Agreed. If we do decide after a while to remove an old name, then we should do a deprecation notice first.
Quoted 5 lines
Another minor point is, if this needs a Fixes tag? Yes, in the sense it feels like it added a banana skin for users (the patches are because I hit this issue with 25.07). I didn't add it for now, as no guarantees were broken and there isn't an upstream stable for backporting to anyway.
If there is no backporting, I'm not sure it matters. Maybe add one anyway to imply that this was something that should have been thought of in the original patch.
/Bruce
23/09/2025 15:28, Bruce Richardson:
Quoted 6 lines · Kevin Traynor
Quoted 5 lines
Yes, that is a good point for discussion. Seen as support for the legacy names were already dropped and I wasn't aware of any ABI like policy about it, I thought there may be a preference for deprecation warning/continuing to move to the new name only.
Quoted 6 lines
Quoted 3 lines
I would be happy to keep the legacy name without a warning/deprecation for a longer term and we could adopt this as general guideline by default too. It should not cost much effort to do this.
Agreed. If we do decide after a while to remove an old name, then we should do a deprecation notice first.
I don't think we should require a notice if there is no deprecation, just an alias added.
Quoted 8 lines
Quoted 4 lines
Another minor point is, if this needs a Fixes tag? Yes, in the sense it feels like it added a banana skin for users (the patches are because I hit this issue with 25.07). I didn't add it for now, as no guarantees were broken and there isn't an upstream stable for backporting to anyway.
If there is no backporting, I'm not sure it matters. Maybe add one anyway to imply that this was something that should have been thought of in the original patch.
Backports are not only for upstream branches.
If someone wants to maintain 25.07 privately,
it is good to know what to backport.
v2 cover build: add backward compatibility for nested drivers
In reply to Kevin TraynorSince Intel drivers moved from 'net/*' to 'net/intel/*' there are some changes required when enabling or disabling those drivers from the meson command line. e.g. 'net/ixgbe' no longer works and needs to be replaced by 'net/intel/ixgbe'
These patches are to allow backwards compatibility for legacy driver names and wildcarding of nested drivers e.g. 'net/ixgbe' and 'net/*'
v2:
1/2
- removed deprecation warning
- simplified loop and updated comments
- added Fixes tag
2/2
- Updated list-dir-globs.py to allow recursive wildcards
- simplified to use '**'
- added Fixes tag
Kevin Traynor (2):
build: add backward compatibility for nested drivers
build: add backward compatibility for wildcarding nested drivers
buildtools/list-dir-globs.py | 2 +- drivers/meson.build | 43 +++++++++++++++++++++++++++++++----- 2 files changed, 38 insertions(+), 7 deletions(-)
Signature · 1 line
2.51.0
PATCH v2 1/2 build: add backward compatibility for nested drivers
Intel driver were moved from 'net/*' to '/net/intel/*' in DPDK 25.03 in commitc1d145834f28 ("net/intel: move Intel drivers to a subdirectory")
This means that any enabling or disabling of those drivers from the command line using the old names will no longer work. e.g. 'net/ixgbe' will not enable/disable the ixgbe driver.
The drivers enabled or disabled are reported in the meson logs, but it is easy to miss this change in the list of drivers and end up with a build missing drivers or drivers unintentionally enabled.
It also means that any users working with different versions of DPDK have to enable/disable drivers differently depending on the DPDK version.
To avoid the issues above, add backwards compatibility for old Intel driver names with a warning. It can be extended for other drivers if the need arises.
--- drivers/meson.build | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-)
drivers/meson.build +33 -5
@@ -33,10 +33,38 @@ if meson.is_cross_build() endif -# add cmdline disabled drivers and meson disabled drivers together -disable_drivers += ',' + get_option('disable_drivers') +# map legacy driver names +driver_map = { + 'net/e1000': 'net/intel/e1000', + 'net/fm10k': 'net/intel/fm10k', + 'net/i40e': 'net/intel/i40e', + 'net/iavf': 'net/intel/iavf', + 'net/ice': 'net/intel/ice', + 'net/idpf': 'net/intel/idpf', + 'net/ipn3ke': 'net/intel/ipn3ke', + 'net/ixgbe': 'net/intel/ixgbe', + 'net/cpfl': 'net/intel/cpfl', +} + +foreach driver_option : ['disable_drivers', 'enable_drivers'] + # get list of drivers from the option + cmdline_drivers = get_option(driver_option) + foreach driver : cmdline_drivers.split(',') + if driver == '' + continue + endif + # check if driver has a legacy name which maps to a new name + if driver_map.has_key(driver) + # use new name instead of legacy name + driver = driver_map[driver] + endif + if driver_option == 'disable_drivers' + disable_drivers += ',' + driver + else + enable_drivers += ',' + driver + endif + endforeach +endforeach + disable_drivers = run_command(list_dir_globs, disable_drivers, check: true).stdout().split() - -# add cmdline enabled drivers and meson enabled drivers together -enable_drivers = ',' + get_option('enable_drivers') enable_drivers = run_command(list_dir_globs, enable_drivers, check: true).stdout().split() require_drivers = true
Signature · 1 line
2.51.0
PATCH v2 2/2 build: add backward compatibility for wildcarding nested drivers
In reply to Kevin TraynorUp until DPDK 25.03 'net/*' could be used with meson options enable_drivers or disable_drivers to explicitly enable or disable all net drivers.
In DPDK 25.03 commitc1d145834f28 ("net/intel: move Intel drivers to a subdirectory") moved Intel drivers to 'net/intel/*' and 'net/*' no longer enabled or disabled the Intel drivers.
Enable recursive wildcard pattern '**' and expand wildcard handling to include nested drivers. e.g. 'net/*' will also enable/disable drivers in 'net/*/*'
This adds backward compatibility so that so that 'net/*' will continue to enable/disable Intel and any future nested drivers.
--- buildtools/list-dir-globs.py | 2 +- drivers/meson.build | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-)
buildtools/list-dir-globs.py +1 -1
@@ -16,5 +16,5 @@ for path in sys.argv[1].split(','): if path: - for p in iglob(os.path.join(root, path)): + for p in iglob(os.path.join(root, path), recursive=True): if os.path.isdir(p): print(os.path.relpath(p, start=root).replace('\\', '/'))
drivers/meson.build +4 -1
@@ -57,4 +57,7 @@ foreach driver_option : ['disable_drivers', 'enable_drivers'] # use new name instead of legacy name driver = driver_map[driver] + elif driver.endswith('/*') + # make wildcard recursive to include nested drivers + driver = driver + '*' endif if driver_option == 'disable_drivers'
@@ -71,5 +74,5 @@ require_drivers = true if enable_drivers.length() == 0 require_drivers = false - enable_drivers = run_command(list_dir_globs, '*/*,*/*/*', check: true).stdout().split() + enable_drivers = run_command(list_dir_globs, '**', check: true).stdout().split() endif
Signature · 1 line
2.51.0
Quoted 18 lines · Kevin Traynor
Since Intel drivers moved from '
net/*' to 'net/intel/*' there are some changes required when enabling or disabling those drivers from the meson command line. e.g. 'net/ixgbe' no longer works and needs to be replaced by 'net/intel/ixgbe'These patches are to allow backwards compatibility for legacy driver names and wildcarding of nested drivers e.g. 'net/ixgbe' and '
net/*'v2:
1/2
- removed deprecation warning
- simplified loop and updated comments
- added Fixes tag
2/2
- Updatedlist-dir-globs.pyto allow recursive wildcards
- simplified to use '**'
- added Fixes tag
Quoted 9 lines
Kevin Traynor (2):
build: add backward compatibility for nested drivers
build: add backward compatibility for wildcarding nested driversbuildtools/list-dir-globs.py | 2 +- drivers/meson.build | 43 +++++++++++++++++++++++++++++++----- 2 files changed, 38 insertions(+), 7 deletions(-)
v3 cover build: add backward compatibility for nested drivers
In reply to Kevin TraynorSince Intel drivers moved from 'net/*' to 'net/intel/*' there are some changes required when enabling or disabling those drivers from the meson command line. e.g. 'net/ixgbe' no longer works and needs to be replaced by 'net/intel/ixgbe'
These patches are to allow backwards compatibility for legacy driver names and wildcarding of nested drivers e.g. 'net/ixgbe' and 'net/*'
v3:
1/2
- update commit message as the warning was removed in v2
v2:
1/2
- removed deprecation warning
- simplified loop and updated comments
- added Fixes tag
2/2
- Updated list-dir-globs.py to allow recursive wildcards
- simplified to use '**'
- added Fixes tag
Kevin Traynor (2):
build: add backward compatibility for nested drivers
build: add backward compatibility for wildcarding nested drivers
buildtools/list-dir-globs.py | 2 +- drivers/meson.build | 43 +++++++++++++++++++++++++++++++----- 2 files changed, 38 insertions(+), 7 deletions(-)
Signature · 1 line
2.51.0
PATCH v3 1/2 build: add backward compatibility for nested drivers
Intel driver were moved from 'net/*' to '/net/intel/*' in DPDK 25.03 in commitc1d145834f28 ("net/intel: move Intel drivers to a subdirectory")
This means that any enabling or disabling of those drivers from the command line using the old names will no longer work. e.g. 'net/ixgbe' will not enable/disable the ixgbe driver.
The drivers enabled or disabled are reported in the meson logs, but it is easy to miss this change in the list of drivers and end up with a build missing drivers or drivers unintentionally enabled.
It also means that any users working with different versions of DPDK have to enable/disable drivers differently depending on the DPDK version.
To avoid the issues above, add backwards compatibility for old Intel driver names. It can be extended for other drivers if the need arises.
--- drivers/meson.build | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-)
drivers/meson.build +33 -5
@@ -33,10 +33,38 @@ if meson.is_cross_build() endif -# add cmdline disabled drivers and meson disabled drivers together -disable_drivers += ',' + get_option('disable_drivers') +# map legacy driver names +driver_map = { + 'net/e1000': 'net/intel/e1000', + 'net/fm10k': 'net/intel/fm10k', + 'net/i40e': 'net/intel/i40e', + 'net/iavf': 'net/intel/iavf', + 'net/ice': 'net/intel/ice', + 'net/idpf': 'net/intel/idpf', + 'net/ipn3ke': 'net/intel/ipn3ke', + 'net/ixgbe': 'net/intel/ixgbe', + 'net/cpfl': 'net/intel/cpfl', +} + +foreach driver_option : ['disable_drivers', 'enable_drivers'] + # get list of drivers from the option + cmdline_drivers = get_option(driver_option) + foreach driver : cmdline_drivers.split(',') + if driver == '' + continue + endif + # check if driver has a legacy name which maps to a new name + if driver_map.has_key(driver) + # use new name instead of legacy name + driver = driver_map[driver] + endif + if driver_option == 'disable_drivers' + disable_drivers += ',' + driver + else + enable_drivers += ',' + driver + endif + endforeach +endforeach + disable_drivers = run_command(list_dir_globs, disable_drivers, check: true).stdout().split() - -# add cmdline enabled drivers and meson enabled drivers together -enable_drivers = ',' + get_option('enable_drivers') enable_drivers = run_command(list_dir_globs, enable_drivers, check: true).stdout().split() require_drivers = true
Signature · 1 line
2.51.0
PATCH v3 2/2 build: add backward compatibility for wildcarding nested drivers
In reply to Kevin TraynorUp until DPDK 25.03 'net/*' could be used with meson options enable_drivers or disable_drivers to explicitly enable or disable all net drivers.
In DPDK 25.03 commitc1d145834f28 ("net/intel: move Intel drivers to a subdirectory") moved Intel drivers to 'net/intel/*' and 'net/*' no longer enabled or disabled the Intel drivers.
Enable recursive wildcard pattern '**' and expand wildcard handling to include nested drivers. e.g. 'net/*' will also enable/disable drivers in 'net/*/*'
This adds backward compatibility so that so that 'net/*' will continue to enable/disable Intel and any future nested drivers.
--- buildtools/list-dir-globs.py | 2 +- drivers/meson.build | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-)
buildtools/list-dir-globs.py +1 -1
@@ -16,5 +16,5 @@ for path in sys.argv[1].split(','): if path: - for p in iglob(os.path.join(root, path)): + for p in iglob(os.path.join(root, path), recursive=True): if os.path.isdir(p): print(os.path.relpath(p, start=root).replace('\\', '/'))
drivers/meson.build +4 -1
@@ -57,4 +57,7 @@ foreach driver_option : ['disable_drivers', 'enable_drivers'] # use new name instead of legacy name driver = driver_map[driver] + elif driver.endswith('/*') + # make wildcard recursive to include nested drivers + driver = driver + '*' endif if driver_option == 'disable_drivers'
@@ -71,5 +74,5 @@ require_drivers = true if enable_drivers.length() == 0 require_drivers = false - enable_drivers = run_command(list_dir_globs, '*/*,*/*/*', check: true).stdout().split() + enable_drivers = run_command(list_dir_globs, '**', check: true).stdout().split() endif
Signature · 1 line
2.51.0
29/09/2025 12:05, Kevin Traynor:
Quoted 7 lines
Since Intel drivers moved from '
net/*' to 'net/intel/*' there are some changes required when enabling or disabling those drivers from the meson command line. e.g. 'net/ixgbe' no longer works and needs to be replaced by 'net/intel/ixgbe'These patches are to allow backwards compatibility for legacy driver names and wildcarding of nested drivers e.g. 'net/ixgbe' and '
net/*'
Applied with Cc [email protected], thanks.