* [PATCH 1/2] build: add backward compatibility for nested drivers
@ 2025-09-22 11:07 Kevin Traynor
2025-09-22 11:07 ` [PATCH 2/2] build: add backwards compatibility for wildcarding " Kevin Traynor
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Kevin Traynor @ 2025-09-22 11:07 UTC (permalink / raw)
To: dev, bruce.richardson; +Cc: david.marchand, thomas, Kevin Traynor
Intel driver were moved from 'net/*' to '/net/intel/*' in DPDK 25.03
in commit
c1d145834f28 ("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.
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
drivers/meson.build | 40 +++++++++++++++++++++++++++++++++++-----
1 file changed, 35 insertions(+), 5 deletions(-)
diff --git a/drivers/meson.build b/drivers/meson.build
index f25f425565..3fbf04e1cd 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -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
--
2.51.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/2] build: add backwards compatibility for wildcarding nested drivers
2025-09-22 11:07 [PATCH 1/2] build: add backward compatibility for nested drivers Kevin Traynor
@ 2025-09-22 11:07 ` Kevin Traynor
2025-09-22 15:52 ` Thomas Monjalon
2025-09-22 15:51 ` [PATCH 1/2] build: add backward compatibility for " Thomas Monjalon
2025-09-24 12:34 ` [PATCH v2 0/2] " Kevin Traynor
2 siblings, 1 reply; 12+ messages in thread
From: Kevin Traynor @ 2025-09-22 11:07 UTC (permalink / raw)
To: dev, bruce.richardson; +Cc: david.marchand, thomas, Kevin Traynor
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 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 <ktraynor@redhat.com>
---
drivers/meson.build | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/meson.build b/drivers/meson.build
index 3fbf04e1cd..ccd25e4d18 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -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'
--
2.51.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] build: add backward compatibility for nested drivers
2025-09-22 11:07 [PATCH 1/2] build: add backward compatibility for nested drivers Kevin Traynor
2025-09-22 11:07 ` [PATCH 2/2] build: add backwards compatibility for wildcarding " Kevin Traynor
@ 2025-09-22 15:51 ` Thomas Monjalon
2025-09-23 13:08 ` Kevin Traynor
2025-09-24 12:34 ` [PATCH v2 0/2] " Kevin Traynor
2 siblings, 1 reply; 12+ messages in thread
From: Thomas Monjalon @ 2025-09-22 15:51 UTC (permalink / raw)
To: dev, Kevin Traynor; +Cc: bruce.richardson, david.marchand, Kevin Traynor
22/09/2025 13:07, Kevin Traynor:
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> -# 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',
> +}
Should we build this list inside a file drivers/net/intel/meson.build ?
I'm not sure my idea is better...
> +
> +# 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.
> + 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.
> + .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.
> 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')
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] build: add backwards compatibility for wildcarding nested drivers
2025-09-22 11:07 ` [PATCH 2/2] build: add backwards compatibility for wildcarding " Kevin Traynor
@ 2025-09-22 15:52 ` Thomas Monjalon
2025-09-23 13:09 ` Kevin Traynor
0 siblings, 1 reply; 12+ messages in thread
From: Thomas Monjalon @ 2025-09-22 15:52 UTC (permalink / raw)
To: dev, Kevin Traynor; +Cc: bruce.richardson, david.marchand, Kevin Traynor
22/09/2025 13:07, Kevin Traynor:
> 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 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 <ktraynor@redhat.com>
> ---
> drivers/meson.build | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/meson.build b/drivers/meson.build
> index 3fbf04e1cd..ccd25e4d18 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -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?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] build: add backward compatibility for nested drivers
2025-09-22 15:51 ` [PATCH 1/2] build: add backward compatibility for " Thomas Monjalon
@ 2025-09-23 13:08 ` Kevin Traynor
2025-09-23 13:28 ` Bruce Richardson
0 siblings, 1 reply; 12+ messages in thread
From: Kevin Traynor @ 2025-09-23 13:08 UTC (permalink / raw)
To: Thomas Monjalon, dev; +Cc: bruce.richardson, david.marchand
On 22/09/2025 16:51, Thomas Monjalon wrote:
> 22/09/2025 13:07, Kevin Traynor:
>> --- a/drivers/meson.build
>> +++ b/drivers/meson.build
>> -# 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',
>> +}
>
> 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.
>> +
>> +# 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
>> + 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.
>> + .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.
>
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.
>> 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')
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] build: add backwards compatibility for wildcarding nested drivers
2025-09-22 15:52 ` Thomas Monjalon
@ 2025-09-23 13:09 ` Kevin Traynor
0 siblings, 0 replies; 12+ messages in thread
From: Kevin Traynor @ 2025-09-23 13:09 UTC (permalink / raw)
To: Thomas Monjalon, dev; +Cc: bruce.richardson, david.marchand
On 22/09/2025 16:52, Thomas Monjalon wrote:
> 22/09/2025 13:07, Kevin Traynor:
>> 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 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 <ktraynor@redhat.com>
>> ---
>> drivers/meson.build | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/meson.build b/drivers/meson.build
>> index 3fbf04e1cd..ccd25e4d18 100644
>> --- a/drivers/meson.build
>> +++ b/drivers/meson.build
>> @@ -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?
>
>
I will check, thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] build: add backward compatibility for nested drivers
2025-09-23 13:08 ` Kevin Traynor
@ 2025-09-23 13:28 ` Bruce Richardson
2025-09-24 8:43 ` Thomas Monjalon
0 siblings, 1 reply; 12+ messages in thread
From: Bruce Richardson @ 2025-09-23 13:28 UTC (permalink / raw)
To: Kevin Traynor; +Cc: Thomas Monjalon, dev, david.marchand
On Tue, Sep 23, 2025 at 02:08:35PM +0100, Kevin Traynor wrote:
> On 22/09/2025 16:51, Thomas Monjalon wrote:
> > 22/09/2025 13:07, Kevin Traynor:
> >> --- a/drivers/meson.build
> >> +++ b/drivers/meson.build
> >> -# 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',
> >> +}
> >
> > 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.
>
I'm fine either way. Having a general list may be good, as we may have
other driver moves or renames in future too.
> >> +
> >> +# 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
>
> >> + 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.
>
Agreed. If we do decide after a while to remove an old name, then we should
do a deprecation notice first.
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] build: add backward compatibility for nested drivers
2025-09-23 13:28 ` Bruce Richardson
@ 2025-09-24 8:43 ` Thomas Monjalon
0 siblings, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2025-09-24 8:43 UTC (permalink / raw)
To: Kevin Traynor, Bruce Richardson; +Cc: dev, david.marchand
23/09/2025 15:28, Bruce Richardson:
> On Tue, Sep 23, 2025 at 02:08:35PM +0100, Kevin Traynor wrote:
> > 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.
I don't think we should require a notice if there is no deprecation,
just an alias added.
> > 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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 0/2] build: add backward compatibility for nested drivers
2025-09-22 11:07 [PATCH 1/2] build: add backward compatibility for nested drivers Kevin Traynor
2025-09-22 11:07 ` [PATCH 2/2] build: add backwards compatibility for wildcarding " Kevin Traynor
2025-09-22 15:51 ` [PATCH 1/2] build: add backward compatibility for " Thomas Monjalon
@ 2025-09-24 12:34 ` Kevin Traynor
2025-09-24 12:34 ` [PATCH v2 1/2] " Kevin Traynor
` (2 more replies)
2 siblings, 3 replies; 12+ messages in thread
From: Kevin Traynor @ 2025-09-24 12:34 UTC (permalink / raw)
To: dev, bruce.richardson; +Cc: david.marchand, thomas, 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
- 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(-)
--
2.51.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 1/2] build: add backward compatibility for nested drivers
2025-09-24 12:34 ` [PATCH v2 0/2] " Kevin Traynor
@ 2025-09-24 12:34 ` Kevin Traynor
2025-09-24 12:34 ` [PATCH v2 2/2] build: add backward compatibility for wildcarding " Kevin Traynor
2025-09-24 13:06 ` [PATCH v2 0/2] build: add backward compatibility for " Bruce Richardson
2 siblings, 0 replies; 12+ messages in thread
From: Kevin Traynor @ 2025-09-24 12:34 UTC (permalink / raw)
To: dev, bruce.richardson; +Cc: david.marchand, thomas, Kevin Traynor
Intel driver were moved from 'net/*' to '/net/intel/*' in DPDK 25.03
in commit
c1d145834f28 ("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.
Fixes: c1d145834f28 ("net/intel: move Intel drivers to a subdirectory")
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
drivers/meson.build | 38 +++++++++++++++++++++++++++++++++-----
1 file changed, 33 insertions(+), 5 deletions(-)
diff --git a/drivers/meson.build b/drivers/meson.build
index f25f425565..2f32a8559f 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -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
--
2.51.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 2/2] build: add backward compatibility for wildcarding nested drivers
2025-09-24 12:34 ` [PATCH v2 0/2] " Kevin Traynor
2025-09-24 12:34 ` [PATCH v2 1/2] " Kevin Traynor
@ 2025-09-24 12:34 ` Kevin Traynor
2025-09-24 13:06 ` [PATCH v2 0/2] build: add backward compatibility for " Bruce Richardson
2 siblings, 0 replies; 12+ messages in thread
From: Kevin Traynor @ 2025-09-24 12:34 UTC (permalink / raw)
To: dev, bruce.richardson; +Cc: david.marchand, thomas, Kevin Traynor
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 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.
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.
Fixes: c1d145834f28 ("net/intel: move Intel drivers to a subdirectory")
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
buildtools/list-dir-globs.py | 2 +-
drivers/meson.build | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/buildtools/list-dir-globs.py b/buildtools/list-dir-globs.py
index fb8619db64..a8a3926d49 100755
--- a/buildtools/list-dir-globs.py
+++ b/buildtools/list-dir-globs.py
@@ -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('\\', '/'))
diff --git a/drivers/meson.build b/drivers/meson.build
index 2f32a8559f..7163b5ddf1 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -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
--
2.51.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/2] build: add backward compatibility for nested drivers
2025-09-24 12:34 ` [PATCH v2 0/2] " Kevin Traynor
2025-09-24 12:34 ` [PATCH v2 1/2] " Kevin Traynor
2025-09-24 12:34 ` [PATCH v2 2/2] build: add backward compatibility for wildcarding " Kevin Traynor
@ 2025-09-24 13:06 ` Bruce Richardson
2 siblings, 0 replies; 12+ messages in thread
From: Bruce Richardson @ 2025-09-24 13:06 UTC (permalink / raw)
To: Kevin Traynor; +Cc: dev, david.marchand, thomas
On Wed, Sep 24, 2025 at 01:34:20PM +0100, Kevin Traynor wrote:
> 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
> - 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(-)
>
> --
Series-acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2025-09-24 13:07 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-22 11:07 [PATCH 1/2] build: add backward compatibility for nested drivers Kevin Traynor
2025-09-22 11:07 ` [PATCH 2/2] build: add backwards compatibility for wildcarding " Kevin Traynor
2025-09-22 15:52 ` Thomas Monjalon
2025-09-23 13:09 ` Kevin Traynor
2025-09-22 15:51 ` [PATCH 1/2] build: add backward compatibility for " Thomas Monjalon
2025-09-23 13:08 ` Kevin Traynor
2025-09-23 13:28 ` Bruce Richardson
2025-09-24 8:43 ` Thomas Monjalon
2025-09-24 12:34 ` [PATCH v2 0/2] " Kevin Traynor
2025-09-24 12:34 ` [PATCH v2 1/2] " Kevin Traynor
2025-09-24 12:34 ` [PATCH v2 2/2] build: add backward compatibility for wildcarding " Kevin Traynor
2025-09-24 13:06 ` [PATCH v2 0/2] build: add backward compatibility for " Bruce Richardson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).