* [PATCH] net/sxe2: fix build when optional libraries are disabled
@ 2026-08-12 17:47 Stephen Hemminger
0 siblings, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2026-08-12 17:47 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Jie Liu
This was found by AI sandbox build when doing other fixes
to EAL. The sxe2 driver was doing handrolled meson to pick
up AVX which fails if security library not present.
Fix build failure when building with
"meson setup build -Denable_libs=eal":
drivers/net/sxe2/meson.build:37:24: ERROR:
Unknown variable name "static_rte_security".
Use sources_avx2 and sources_avx512 instead of hand-rolled
static libraries.
Fixes: 59d866861188 ("net/sxe2: add AVX2 Rx and Tx")
Fixes: 0af0bdcdcf83 ("net/sxe2: add AVX512 Rx and Tx")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/sxe2/meson.build | 35 ++---------------------------------
1 file changed, 2 insertions(+), 33 deletions(-)
diff --git a/drivers/net/sxe2/meson.build b/drivers/net/sxe2/meson.build
index d653d071a9..409e3be248 100644
--- a/drivers/net/sxe2/meson.build
+++ b/drivers/net/sxe2/meson.build
@@ -15,39 +15,8 @@ includes += include_directories('../../common/sxe2')
if arch_subdir == 'x86'
sources += files('sxe2_txrx_vec_sse.c')
-
- sxe2_avx512_cpu_support =(
- cc.get_define('__AVX512F__', args: machine_args) != '' and
- cc.get_define('__AVX512BW__', args: machine_args) != '')
-
- sxe2_avx512_cc_support = (
- not machine_args.contains('-mno-avx512f') and
- cc.has_argument('-mavx512f') and
- cc.has_argument('-mavx512bw'))
-
- if sxe2_avx512_cpu_support == true or sxe2_avx512_cc_support == true
- cflags += ['-DCC_AVX512_SUPPORT']
- avx512_args = [cflags, '-mavx512f', '-mavx512bw']
- if cc.has_argument('-march=skylake-avx512')
- avx512_args += '-march=skylake-avx512'
- endif
- sxe2_avx512_lib = static_library('sxe2_avx512_lib', 'sxe2_txrx_vec_avx512.c',
- dependencies: [static_rte_ethdev,
- static_rte_kvargs, static_rte_hash,
- static_rte_security, static_rte_cryptodev, static_rte_bus_pci],
- include_directories: includes,
- c_args: avx512_args)
- objs += sxe2_avx512_lib.extract_objects('sxe2_txrx_vec_avx512.c')
- endif
- sxe2_avx2_lib = static_library('sxe2_avx2_lib',
- 'sxe2_txrx_vec_avx2.c',
- dependencies: [static_rte_ethdev,
- static_rte_kvargs, static_rte_hash,
- static_rte_security, static_rte_cryptodev,
- static_rte_bus_pci],
- include_directories: includes,
- c_args: [cflags, '-mavx2'])
- objs += sxe2_avx2_lib.extract_objects('sxe2_txrx_vec_avx2.c')
+ sources_avx2 += files('sxe2_txrx_vec_avx2.c')
+ sources_avx512 += files('sxe2_txrx_vec_avx512.c')
elif arch_subdir == 'arm'
sources += files('sxe2_txrx_vec_neon.c')
endif
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] net/sxe2: fix build when optional libraries are disabled
@ 2026-08-12 17:55 Stephen Hemminger
2026-08-13 16:47 ` Stephen Hemminger
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2026-08-12 17:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Jie Liu
This was found by AI sandbox build when doing other fixes
to EAL. The sxe2 driver was doing handrolled meson to pick
up AVX which fails if security library not present.
Fix build failure when building with
"meson setup build -Denable_libs=eal":
drivers/net/sxe2/meson.build:37:24: ERROR:
Unknown variable name "static_rte_security".
Use sources_avx2 and sources_avx512 instead of hand-rolled
static libraries.
Fixes: 59d866861188 ("net/sxe2: add AVX2 Rx and Tx")
Fixes: 0af0bdcdcf83 ("net/sxe2: add AVX512 Rx and Tx")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/sxe2/meson.build | 35 ++---------------------------------
1 file changed, 2 insertions(+), 33 deletions(-)
diff --git a/drivers/net/sxe2/meson.build b/drivers/net/sxe2/meson.build
index d653d071a9..409e3be248 100644
--- a/drivers/net/sxe2/meson.build
+++ b/drivers/net/sxe2/meson.build
@@ -15,39 +15,8 @@ includes += include_directories('../../common/sxe2')
if arch_subdir == 'x86'
sources += files('sxe2_txrx_vec_sse.c')
-
- sxe2_avx512_cpu_support =(
- cc.get_define('__AVX512F__', args: machine_args) != '' and
- cc.get_define('__AVX512BW__', args: machine_args) != '')
-
- sxe2_avx512_cc_support = (
- not machine_args.contains('-mno-avx512f') and
- cc.has_argument('-mavx512f') and
- cc.has_argument('-mavx512bw'))
-
- if sxe2_avx512_cpu_support == true or sxe2_avx512_cc_support == true
- cflags += ['-DCC_AVX512_SUPPORT']
- avx512_args = [cflags, '-mavx512f', '-mavx512bw']
- if cc.has_argument('-march=skylake-avx512')
- avx512_args += '-march=skylake-avx512'
- endif
- sxe2_avx512_lib = static_library('sxe2_avx512_lib', 'sxe2_txrx_vec_avx512.c',
- dependencies: [static_rte_ethdev,
- static_rte_kvargs, static_rte_hash,
- static_rte_security, static_rte_cryptodev, static_rte_bus_pci],
- include_directories: includes,
- c_args: avx512_args)
- objs += sxe2_avx512_lib.extract_objects('sxe2_txrx_vec_avx512.c')
- endif
- sxe2_avx2_lib = static_library('sxe2_avx2_lib',
- 'sxe2_txrx_vec_avx2.c',
- dependencies: [static_rte_ethdev,
- static_rte_kvargs, static_rte_hash,
- static_rte_security, static_rte_cryptodev,
- static_rte_bus_pci],
- include_directories: includes,
- c_args: [cflags, '-mavx2'])
- objs += sxe2_avx2_lib.extract_objects('sxe2_txrx_vec_avx2.c')
+ sources_avx2 += files('sxe2_txrx_vec_avx2.c')
+ sources_avx512 += files('sxe2_txrx_vec_avx512.c')
elif arch_subdir == 'arm'
sources += files('sxe2_txrx_vec_neon.c')
endif
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net/sxe2: fix build when optional libraries are disabled
2026-08-12 17:55 [PATCH] net/sxe2: fix build when optional libraries are disabled Stephen Hemminger
@ 2026-08-13 16:47 ` Stephen Hemminger
0 siblings, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2026-08-13 16:47 UTC (permalink / raw)
To: dev; +Cc: Jie Liu
On Wed, 12 Aug 2026 10:55:31 -0700
Stephen Hemminger <stephen@networkplumber.org> wrote:
> This was found by AI sandbox build when doing other fixes
> to EAL. The sxe2 driver was doing handrolled meson to pick
> up AVX which fails if security library not present.
>
> Fix build failure when building with
> "meson setup build -Denable_libs=eal":
>
> drivers/net/sxe2/meson.build:37:24: ERROR:
> Unknown variable name "static_rte_security".
>
> Use sources_avx2 and sources_avx512 instead of hand-rolled
> static libraries.
>
> Fixes: 59d866861188 ("net/sxe2: add AVX2 Rx and Tx")
> Fixes: 0af0bdcdcf83 ("net/sxe2: add AVX512 Rx and Tx")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
AI check of CI AI review says all its complaints are noise.
Not valid. I verified every claim against the upstream tree and empirically built it — none of the four findings hold up. The review is a textbook diff-only miss: all of its doubts hinge on infrastructure in drivers/meson.build that it couldn't see.
What I verified:
Warning 2 (sources_avx2/avx512 "potentially unused") — false. drivers/meson.build initializes sources_avx2 = [] / sources_avx512 = [] per driver (lines 155–156) and processes them after subdir'ing (lines 294–313), building static libs with static_deps and extracting the objects. Empirically: applied the patch, built with -Denable_drivers=net/sxe2,common/sxe2, and the final librte_net_sxe2.a contains both sxe2_txrx_vec_avx2.c.o and sxe2_txrx_vec_avx512.c.o. This warning is also exactly the "should be verified" hedge pattern AGENTS.md tells reviewers to suppress.
Info 1 (CC_AVX512_SUPPORT removed) — not an issue. The standard infrastructure does cflags += '-DCC_AVX512_SUPPORT' (line 305) when sources_avx512 is nonempty and cc_has_avx512, before the main driver lib builds. Confirmed in the generated build.ninja: sxe2_txrx.c.o (which contains the #ifdef CC_AVX512_SUPPORT burst-function selection) compiles with the define, and the AVX512 object gets the skylake-avx512 march flags. The standard cc_has_avx512 gate is actually stricter than the old hand-rolled check — it accounts for binutils AVX512 bugs.
Info 2 (dependency list removed) — not an issue. static_deps is assembled from the driver's own deps (static_deps += get_variable('static_rte_' + d), line 236), and sxe2's meson.build already declares deps += ['common_sxe2', 'hash', 'cryptodev', 'security'] — visible in the patch's own context lines. The suggestion to consider dropping security/cryptodev is also wrong: sxe2_ipsec.c and sxe2_security.c are in the main sources list. Critically, routing deps through deps is the mechanism of the fix — missing libs now cleanly disable the driver instead of hitting an undefined-variable error at setup time.
Warning 1 (missing release notes) — false positive. The suggested "Fixed Issues"/"Bugs Fixed" section doesn't exist; release_26_11.rst has only New Features, Removed Items, API Changes, ABI Changes, Known Issues. DPDK doesn't document bug fixes in main-branch release notes — the Fixes: tags handle stable backport tracking.
End-to-end confirmation: on the pre-patch tree, meson setup -Denable_libs=eal reproduces the exact reported error (Unknown variable name "static_rte_security"); on the patched tree the same setup succeeds with sxe2 cleanly disabled ("missing internal dependency cryptodev"), and the default config builds the driver with both vector paths linked in. The patch is correct and complete as-is — I'd reply to the CI bot noting the drivers/meson.build infrastructure it missed, since the two Warnings are precisely the vague-verification pattern AGENTS.md is supposed to suppress.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-13 16:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-12 17:55 [PATCH] net/sxe2: fix build when optional libraries are disabled Stephen Hemminger
2026-08-13 16:47 ` Stephen Hemminger
-- strict thread matches above, loose matches on Subject: below --
2026-08-12 17:47 Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox