DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: dev@dpdk.org, bruce.richardson@intel.com
Cc: david.marchand@redhat.com, thomas@monjalon.net,
	Kevin Traynor <ktraynor@redhat.com>
Subject: [PATCH v2 1/2] build: add backward compatibility for nested drivers
Date: Wed, 24 Sep 2025 13:34:21 +0100	[thread overview]
Message-ID: <20250924123422.224988-2-ktraynor@redhat.com> (raw)
In-Reply-To: <20250924123422.224988-1-ktraynor@redhat.com>

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


  reply	other threads:[~2025-09-24 12:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22 11:07 [PATCH " 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   ` Kevin Traynor [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250924123422.224988-2-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).