All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Dimon Zhao <dimon.zhao@nebula-matrix.com>
Cc: dev@dpdk.org, stable@dpdk.org,
	Leon Yu <leon.yu@nebula-matrix.com>,
	Sam Chen <sam.chen@nebula-matrix.com>
Subject: Re: [PATCH v1 1/1] net/nbl: fix Tx VLAN fallback header overlap
Date: Thu, 3 Dec 2026 12:33:05 -0800	[thread overview]
Message-ID: <20261203123305.73751143@phoenix.local> (raw)
In-Reply-To: <20261202025050.3738018-2-dimon.zhao@nebula-matrix.com>

On Wed,  2 Dec 2026 10:50:50 +0800
Dimon Zhao <dimon.zhao@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@dpdk.org
> Signed-off-by: Dimon Zhao <dimon.zhao@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");

      parent reply	other threads:[~2026-12-03 20:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02  2:50 [PATCH v1 0/1] net/nbl: fix Leonis Tx VLAN fallback header overlap Dimon Zhao
2026-12-02  2:50 ` [PATCH v1 1/1] net/nbl: fix " Dimon Zhao
2026-12-03 20:25   ` Stephen Hemminger
2026-12-03 20:33   ` Stephen Hemminger [this message]

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=20261203123305.73751143@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=dimon.zhao@nebula-matrix.com \
    --cc=leon.yu@nebula-matrix.com \
    --cc=sam.chen@nebula-matrix.com \
    --cc=stable@dpdk.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.