Skip to content

[dpdk] Add support for additional drivers#51835

Merged
BillyONeal merged 1 commit into
microsoft:masterfrom
chris1786:dpdk2
May 19, 2026
Merged

[dpdk] Add support for additional drivers#51835
BillyONeal merged 1 commit into
microsoft:masterfrom
chris1786:dpdk2

Conversation

@chris1786
Copy link
Copy Markdown
Contributor

@chris1786 chris1786 commented May 17, 2026

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version, or no changes were necessary.
  • Any fixed CI baseline and CI feature baseline entries are removed from that file, or no entries needed to be changed.
  • All patch files in the port are applied and succeed.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Exactly one version is added in each modified versions file.

@chris1786 chris1786 force-pushed the dpdk2 branch 3 times, most recently from 8583079 to 88c360f Compare May 17, 2026 21:03
@chris1786 chris1786 marked this pull request as ready for review May 17, 2026 21:58
Comment thread ports/dpdk/0002-fix-dependencies.patch Outdated
@BillyONeal
Copy link
Copy Markdown
Member

Thank you for hooking this stuff up!

@chris1786
Copy link
Copy Markdown
Contributor Author

Thank you for hooking this stuff up!

No worries - happy to help. I have more work to do on this port. The next stage is to write ports for the remaining dependencies, which is going to be more involved than what I've done so far, so may take a while.

@chris1786 chris1786 force-pushed the dpdk2 branch 4 times, most recently from 7effe3c to aa1b6f0 Compare May 18, 2026 20:12
@chris1786 chris1786 marked this pull request as draft May 18, 2026 21:10
@chris1786 chris1786 marked this pull request as ready for review May 18, 2026 22:17
@BillyONeal BillyONeal requested a review from Copilot May 19, 2026 02:38
Copy link
Copy Markdown
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@BillyONeal BillyONeal merged commit 41ff869 into microsoft:master May 19, 2026
18 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the dpdk port to expose additional DPDK drivers as opt-in vcpkg features, wiring those features into the Meson disable_drivers configuration, and bumps the port version (with corresponding versions database updates).

Changes:

  • Add new dpdk features for additional drivers (e.g., bnx2x, pcap, ISA-L/zlib compression, CCP/OpenSSL crypto, QAT) and connect them to Meson driver disablement.
  • Bump dpdk port-version to 4 and update the versions database/baseline accordingly.
  • Update the DPDK Meson dependency patching used by the port.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
versions/d-/dpdk.json Adds the new 26.3 port-version 4 entry.
versions/baseline.json Updates dpdk baseline port-version to 4.
ports/dpdk/vcpkg.json Bumps port-version and introduces new opt-in driver features with deps/supports.
ports/dpdk/portfile.cmake Extends disable_drivers assembly to match the new feature set.
ports/dpdk/0002-fix-dependencies.patch Adjusts Meson dependency discovery/requirements for selected drivers and libs.
Comments suppressed due to low confidence (8)

ports/dpdk/0002-fix-dependencies.patch:102

  • Using cc.has_header(..., required: true) inside if not cc.has_header(...) is self-contradictory: with required: true Meson will raise an error rather than return false, so the build=false/subdir_done() path won’t run. Similarly, cc.find_library(..., required: true) makes the subsequent .found() check redundant. Prefer required: false with the existing soft-disable flow, or remove the conditional logic and rely on Meson’s hard error consistently when this driver is explicitly enabled.
-if not cc.has_header('mlx5devx.h')
+if not cc.has_header('mlx5devx.h', required: true)
     build = false
     reason = 'missing dependency, "mlx5devx.h"'
     subdir_done()
 endif
 
-devxlib = cc.find_library('mlx5devx', required: false)
+devxlib = cc.find_library('mlx5devx', required: true)
 if not devxlib.found() or not cc.links(min_c_code, dependencies: devxlib)
     build = false
     reason = 'missing dependency, "mlx5devx"'

ports/dpdk/0002-fix-dependencies.patch:141

  • With dependency('zlib', required: true, ...), Meson will abort if zlib isn’t found, so the following if not dep.found() / build=false block is dead code. Either revert to required: false (and keep the soft-disable behavior) or remove the unreachable dep.found() handling and treat zlib as strictly required when this driver is enabled.
-dep = dependency('zlib', required: false, method: 'pkg-config')
+dep = dependency('zlib', required: true, method: 'pkg-config')
 if not dep.found()
     build = false
     reason = 'missing dependency, "zlib"'

ports/dpdk/0002-fix-dependencies.patch:154

  • dependency('libcrypto', required: true, ...) makes the subsequent if not dep.found() / build=false logic unreachable (Meson will error before dep.found() can be false). If the intent is to keep CCP optional unless explicitly enabled, keep required: false and only raise an error when the driver is requested.
-dep = dependency('libcrypto', required: false, method: 'pkg-config')
+dep = dependency('libcrypto', required: true, method: 'pkg-config')
 if not dep.found()
     build = false
     reason = 'missing dependency, "libcrypto"'

ports/dpdk/0002-fix-dependencies.patch:167

  • dependency('libcrypto', required: true, ...) already hard-fails when missing, so the following if not dep.found() / build=false is dead code. If this driver is meant to be optional unless selected, keep required: false and error only when explicitly enabled; otherwise remove the unreachable branch.
-dep = dependency('libcrypto', required: false, method: 'pkg-config')
+dep = dependency('libcrypto', required: true, method: 'pkg-config')
 if not dep.found()
     build = false
     reason = 'missing dependency, "libcrypto"'

ports/dpdk/0002-fix-dependencies.patch:208

  • dependency(... required: true) makes the if not lib.found() fallback unreachable (Meson will abort before returning an unfound dependency). If you still want the find_library() fallback, keep required: false and only error after both methods fail.
 libnames = ['ibverbs', 'mana']
 libs = []
 foreach libname:libnames
-    lib = dependency('lib' + libname, required:false)
+    lib = dependency('lib' + libname, required:true)
     if not lib.found()
         lib = cc.find_library(libname, required:false)
     endif

ports/dpdk/0002-fix-dependencies.patch:221

  • Same pattern as above: setting required: true for the pkg-config dependency means the subsequent if not lib.found() + find_library() fallback cannot run. If pkg-config is unavailable but the library is otherwise discoverable, this will fail unnecessarily; consider keeping required: false and handling the failure after the fallback attempt.
 libs = []
 foreach libname:libnames
     lib = dependency('lib' + libname, static:static_ibverbs,
-            required:false, method: 'pkg-config')
+            required:true, method: 'pkg-config')
     if not lib.found() and not static_ibverbs
         lib = cc.find_library(libname, required:false)
     endif

ports/dpdk/0002-fix-dependencies.patch:233

  • Switching to error('missing dependency: "libpcap"') changes behavior from skipping the driver to failing the entire configuration when RTE_HAS_LIBPCAP is unset. If this meson.build is reached even when the driver is disabled via disable_drivers, this can break default builds; consider restoring the soft-disable (build=false/reason/subdir_done()) and only hard-error when the driver is explicitly enabled.
 if not dpdk_conf.has('RTE_HAS_LIBPCAP')
-    build = false
-    reason = 'missing dependency, "libpcap"'
+    error('missing dependency: "libpcap"')
 endif

ports/dpdk/0002-fix-dependencies.patch:256

  • For raw/ifpga, switching missing-libfdt handling to error() can make an otherwise-disabled driver abort the whole build if this file is evaluated unconditionally. Additionally, cc.find_library('rt', required: true) makes the subsequent rtdep.found()/cc.links() check inconsistent because Meson will error before returning an unfound dependency. Prefer the soft-disable flow when the driver is not selected, and only hard-fail when the driver is explicitly enabled.
@@ -2,14 +2,12 @@
 # Copyright(c) 2018 Intel Corporation
 
 if not has_libfdt
-    build = false
-    reason = 'missing dependency, "libfdt"'
-    subdir_done()
+    error('missing dependency: "libfdt"')
 endif
 
 rtdep = dependency('librt', required: false)
 if not rtdep.found()
-    rtdep = cc.find_library('rt', required: false)
+    rtdep = cc.find_library('rt', required: true)
 endif
 if not rtdep.found() or not cc.links(min_c_code, dependencies: rtdep)
     build = false

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ports/dpdk/0002-fix-dependencies.patch
Comment thread ports/dpdk/0002-fix-dependencies.patch
Comment thread ports/dpdk/0002-fix-dependencies.patch
Comment thread ports/dpdk/0002-fix-dependencies.patch
Comment thread ports/dpdk/0002-fix-dependencies.patch
Comment thread ports/dpdk/0002-fix-dependencies.patch
@BillyONeal
Copy link
Copy Markdown
Member

copilot really seems confused in reviewing patches. In fairness so are humans

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants