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 2/2] build: add backward compatibility for wildcarding nested drivers
Date: Wed, 24 Sep 2025 13:34:22 +0100	[thread overview]
Message-ID: <20250924123422.224988-3-ktraynor@redhat.com> (raw)
In-Reply-To: <20250924123422.224988-1-ktraynor@redhat.com>

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


  parent 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 1/2] build: add backward compatibility for " 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   ` Kevin Traynor [this message]
2025-09-24 13:06   ` [PATCH v2 0/2] " 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-3-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).