[PATCH 1/2] build: add backward compatibility for nested drivers

Kevin Traynor ktraynor at redhat.com
Mon Sep 22 13:07:07 CEST 2025


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 at 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



More information about the dev mailing list