From: Stephen Hemminger <stephen@networkplumber.org>
To: liujie5@linkdatatechnology.com
Cc: dev@dpdk.org
Subject: Re: [PATCH v2 00/23] net/sxe: added Linkdata sxe ethernet driver
Date: Sat, 30 May 2026 09:34:12 -0700 [thread overview]
Message-ID: <20260530093412.0ab41540@phoenix.local> (raw)
In-Reply-To: <20260530140904.157099-1-liujie5@linkdatatechnology.com>
On Sat, 30 May 2026 22:08:41 +0800
liujie5@linkdatatechnology.com wrote:
> From: Jie Liu <liujie5@linkdatatechnology.com>
>
> This patch set implements core functionality for the SXE PMD,
> including basic driver framework, data path setup, and advanced
> offload features (VLAN, RSS, DCB, PTP etc.).
Did AI review with smarter model and extra effort since this is a largish
patch series and simple models had lots of false positives.
Reviewed patches 01-20 of 23 (21-23 not present in this bundle).
[PATCH v2 07/23] net/sxe2: support IPsec inline protocol offload
Info: In sxe2_security_valid_key(), the buffer-size guard
if (src_key > SXE2_IPSEC_MAX_KEY_LEN)
is_valid = false;
is placed *after* the `if (increment == 0) { is_valid = true; goto l_end; }`
early return, so it is dead code for every fixed-size algorithm (all of the
advertised ciphers/auths use increment 0). This is currently safe only because
every advertised key_size.max equals the 32-byte SXE2_IPSEC_MAX_KEY_LEN buffer,
so capability validation already bounds the copy. If any *_KEY_MAX is later
raised above 32 (e.g. an HMAC key up to the SHA-256 block size) the
memcpy() into tx_sa->enc_key/auth_key[SXE2_IPSEC_MAX_KEY_LEN] would overflow
with no guard firing. Move the SXE2_IPSEC_MAX_KEY_LEN check above the
increment==0 return so it protects all paths.
[PATCH v2 09/23] drivers: interrupt handling
Error: event_thread_run is a plain `volatile int32_t` shared between threads -
written by the control thread (sxe2_event_intr_handler_init/uinit) and read in
the event thread loop `while (event_thread_run)`. volatile provides no
atomicity or inter-thread ordering and is not a substitute for atomics. The
same handler struct already uses RTE_ATOMIC(uint16_t) ndev with
rte_atomic_fetch_add/sub_explicit(), so the fix is consistent: declare the flag
RTE_ATOMIC(uint32_t) and use rte_atomic_store_explicit()/
rte_atomic_load_explicit() (relaxed is sufficient here).
Info: sxe2_event_intr_post() allocates the per-event element with rte_malloc()
in the LSC interrupt path. This is a small control-path structure, not a DMA or
queue buffer, so plain malloc() is preferred - it avoids taking the hugepage
heap lock from interrupt context. Impact is minor since link-change events are
rare.
[PATCH v2 14/23] net/sxe2: implement get monitor address
Info: sxe2_monitor_callback() open-codes the DD mask as
`rte_cpu_to_le_64(1 << SXE2_RX_DESC_STATUS_DD_SHIFT)`. The driver already
defines SXE2_RX_DESC_STATUS_DD_MASK as `(0x1ULL << SXE2_RX_DESC_STATUS_DD_SHIFT)`
for exactly this. Reuse the macro - it keeps the 64-bit form and avoids a bare
`1 <<` should the shift ever move off bit 0.
[PATCH v2 20/23] net/sxe2: add private devargs parsing
Error: `#include <asm-generic/errno-base.h>` is a Linux kernel-internal header.
It does not exist on FreeBSD (the driver's meson.build only disables Windows,
so FreeBSD is still a build target), and it does not define the `errno` lvalue
that the new parse callbacks rely on - only the E* constants. No other DPDK
source includes it. Use `#include <errno.h>`.
Warning: sxe2_parse_u8() is missing the trailing-character check that all four
sibling parsers (fnav_stat_type, sched_layer_mode, high_performance_mode, bool)
perform:
u8_val = strtoul(value, &end, 10);
if (errno) { ... }
*num = u8_val; /* *end != '\0' never checked */
so it silently accepts inputs like "5abc". It also assigns strtoul()'s unsigned
long straight into a uint8_t with no `(uint8_t)` cast and no range check, so a
value such as "300" is truncated to 44 and accepted. Add the
`*end != '\0'` check and a range/cast guard to match the siblings.
next prev parent reply other threads:[~2026-05-30 16:34 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-24 9:32 [PATCH v1 00/23] add net/sxe2 support for flow control liujie5
2026-05-24 9:32 ` [PATCH v1 01/23] net/sxe2: support AVX512 vectorized path for Rx and Tx liujie5
2026-05-24 9:32 ` [PATCH v1 02/23] net/sxe2: add AVX2 vector data " liujie5
2026-05-24 9:32 ` [PATCH v1 03/23] drivers: add supported packet types get callback liujie5
2026-05-24 9:32 ` [PATCH v1 04/23] net/sxe2: support L2 filtering and MAC config liujie5
2026-05-24 9:32 ` [PATCH v1 05/23] drivers: support RSS feature liujie5
2026-05-24 9:32 ` [PATCH v1 06/23] net/sxe2: support TM hierarchy and shaping liujie5
2026-05-24 9:32 ` [PATCH v1 07/23] net/sxe2: support IPsec inline protocol offload liujie5
2026-05-24 9:32 ` [PATCH v1 08/23] net/sxe2: support statistics and multi-process liujie5
2026-05-24 9:32 ` [PATCH v1 09/23] drivers: interrupt handling liujie5
2026-05-24 9:32 ` [PATCH v1 10/23] net/sxe2: add NEON vec Rx/Tx burst functions liujie5
2026-05-24 9:32 ` [PATCH v1 11/23] net/sxe2: add support for VF representors liujie5
2026-05-24 9:32 ` [PATCH v1 12/23] net/sxe2: add support for custom UDP tunnel ports liujie5
2026-05-24 9:32 ` [PATCH v1 13/23] net/sxe2: support firmware version reading liujie5
2026-05-24 9:32 ` [PATCH v1 14/23] net/sxe2: implement get monitor address liujie5
2026-05-24 9:32 ` [PATCH v1 15/23] common/sxe2: add shared SFP module definitions liujie5
2026-05-24 9:32 ` [PATCH v1 16/23] net/sxe2: support SFP module info and EEPROM access liujie5
2026-05-24 9:32 ` [PATCH v1 17/23] net/sxe2: implement private dump info liujie5
2026-05-24 9:32 ` [PATCH v1 18/23] net/sxe2: add mbuf validation in Tx debug mode liujie5
2026-05-24 9:32 ` [PATCH v1 19/23] net/sxe2: add testpmd commands for private features liujie5
2026-05-24 9:32 ` [PATCH v1 20/23] net/sxe2: add private devargs parsing liujie5
2026-05-30 14:08 ` [PATCH v2 00/23] net/sxe: added Linkdata sxe ethernet driver liujie5
2026-05-30 14:08 ` [PATCH v2 01/23] net/sxe2: support AVX512 vectorized path for Rx and Tx liujie5
2026-05-30 14:08 ` [PATCH v2 02/23] net/sxe2: add AVX2 vector data " liujie5
2026-05-30 14:08 ` [PATCH v2 03/23] drivers: add supported packet types get callback liujie5
2026-05-30 14:08 ` [PATCH v2 04/23] net/sxe2: support L2 filtering and MAC config liujie5
2026-05-30 14:08 ` [PATCH v2 05/23] drivers: support RSS feature liujie5
2026-05-30 14:08 ` [PATCH v2 06/23] net/sxe2: support TM hierarchy and shaping liujie5
2026-05-30 14:08 ` [PATCH v2 07/23] net/sxe2: support IPsec inline protocol offload liujie5
2026-05-30 14:08 ` [PATCH v2 08/23] net/sxe2: support statistics and multi-process liujie5
2026-05-30 14:08 ` [PATCH v2 09/23] drivers: interrupt handling liujie5
2026-05-30 14:08 ` [PATCH v2 10/23] net/sxe2: add NEON vec Rx/Tx burst functions liujie5
2026-05-30 14:08 ` [PATCH v2 11/23] drivers: add support for VF representors liujie5
2026-05-30 14:08 ` [PATCH v2 12/23] net/sxe2: add support for custom UDP tunnel ports liujie5
2026-05-30 14:08 ` [PATCH v2 13/23] net/sxe2: support firmware version reading liujie5
2026-05-30 14:08 ` [PATCH v2 14/23] net/sxe2: implement get monitor address liujie5
2026-05-30 14:08 ` [PATCH v2 15/23] common/sxe2: add shared SFP module definitions liujie5
2026-05-30 14:08 ` [PATCH v2 16/23] net/sxe2: support SFP module info and EEPROM access liujie5
2026-05-30 14:08 ` [PATCH v2 17/23] net/sxe2: implement private dump info liujie5
2026-05-30 14:08 ` [PATCH v2 18/23] net/sxe2: add mbuf validation in Tx debug mode liujie5
2026-05-30 14:09 ` [PATCH v2 19/23] net/sxe2: add testpmd commands for private features liujie5
2026-05-30 14:09 ` [PATCH v2 20/23] net/sxe2: add private devargs parsing liujie5
2026-05-30 16:34 ` Stephen Hemminger [this message]
2026-05-26 13:29 ` [PATCH v1 00/23] add net/sxe2 support for flow control Stephen Hemminger
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=20260530093412.0ab41540@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=liujie5@linkdatatechnology.com \
/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