[PATCH v1 1/1] net/nbl: fix Tx VLAN fallback header overlap
Stephen Hemminger
stephen at networkplumber.org
Thu Dec 3 21:33:05 CET 2026
On Wed, 2 Dec 2026 10:50:50 +0800
Dimon Zhao <dimon.zhao at nebula-matrix.com> wrote:
> The Tx fallback uses the extended header size as the slot stride.
> On Leonis this is 12 bytes, but the VLAN fallback writes a 30-byte
> header. A single-segment fallback packet consumes two descriptors,
> so consecutive headers start 24 bytes apart. The second header
> overwrites the first packet's EtherType and VLAN fields.
>
> Use the reserved 32-byte NBL_TX_HEADER_LEN stride for both the
> software header pointer and the descriptor DMA address.
>
> Fixes: 9d7757dce874 ("net/nbl: simulate VLAN offload")
> Cc: stable at dpdk.org
> Signed-off-by: Dimon Zhao <dimon.zhao at nebula-matrix.com>
> ---
One result from AI review
Info
----
net/nbl: fix Tx VLAN fallback header overlap
Nothing enforces at compile time that NBL_TX_HEADER_LEN is large
enough for the fallback header the VLAN path writes. The margin is
two bytes (12 + 14 + 4 = 30 of 32), and the absence of a check is how
the original overlap went unnoticed. Add to nbl_txrx.c:
static_assert(sizeof(union nbl_tx_extend_head) +
sizeof(struct rte_ether_hdr) +
sizeof(struct rte_vlan_hdr) <= NBL_TX_HEADER_LEN,
"NBL_TX_HEADER_LEN too small for VLAN fallback");
More information about the stable
mailing list