From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A173C606A322 for ; Thu, 3 Dec 2026 20:33:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20260707.gappssmtp.com header.i=@networkplumber-org.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=i9AYEJjv Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 13DB5402E5; Thu, 3 Dec 2026 21:33:10 +0100 (CET) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mails.dpdk.org (Postfix) with ESMTPS id DBBFD40292 for ; Thu, 3 Dec 2026 21:33:08 +0100 (CET) Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-ccca948203aso172868a12.3 for ; Thu, 03 Dec 2026 12:33:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20260707.gappssmtp.com; s=20260707; t=1796329987; x=1796934787; darn=dpdk.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=CYWvzJseJaV0ZqnvhNbKoTQtuWra2H+otwtgXAiPWd4=; b=i9AYEJjvGuv85wl3NCgWAxubsg+lhC2MWkggxPbkAsMdxiv3A8Vb4VPmIZchlbRjxg lMeZLepFol18C0ONXRCabCFztggw8gwtEkcdsCLY6eBKduqS1KtKwOXddcRpJ57LP8RY AaC5I5wnvtEz03cOQnvRorInLj38+vS1bl+f58tRqwaXBFUrD8w4HQxlVizIU7FYv0ts ixdA9gF5z1KWm9aTqAHPdMAOcDPHCubSC3dEJgatgT7XbmZNj8QW+jjVD0iZLF9VlqkT SqgN98AHZBMM1H/QnJkdQ7eZyVxGJzQMAMUUDHDuXDaNKSMEoeeIZ36OX1TYMnZhSKfh qP/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796329987; x=1796934787; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=CYWvzJseJaV0ZqnvhNbKoTQtuWra2H+otwtgXAiPWd4=; b=z6O6cFqTfbIuSznKwdwFoL7lyJU3W+RpSij12PP4Na6Z3KUjzd9nQ588+/J6D/2AjL E/gUBXIDIcgf1S8Nm1sQx+vdATaStEYKffpKCNCKLE31q1i1A6mlGMSE0+VNXVF76rll y1og/DFenhDpG/BuvnyivlOndokK1zAokLz9DyJnG7fwSsjsKADMVxg0d1lmQ+L9AKvw d611a5P/dvrcjRHbBXaYfIoK/+GxSBQjPFyOIFS/Zr9Tt82KDAMgFdqDPii37IFGCjVT 8SOa88Ox4xyulXyt+cljLbRe+mvpGOZNER4N745Mu1m1ks5HYfjOfH3fNQkLcMYt9n6D ellQ== X-Gm-Message-State: APuU4Z9jlj5e4DP1aOU6n62VvrcDAR4kjuKKhgBUXQTTCzzzZg2eX/P/ 8oK7wgXWfPMyeARMufp+3DHglM1rVQsFCU58UF5bIN8wkBxJnbMhs4KsEmxY7tpU/Oc= X-Gm-Gg: AZFdTZcMsHGx9/b1Akik5KjpVsXukgRx5YS2KrCRShOQE1Ot1jvqu/Gb9LXNoIfiFRy WtLkJrmE2WuQBtiQDGSTNe4d6PRSdwN6V3agyMoXp5/cQZg5UhbT6K88Qo1h6fSrRhTFgXcdVI9 dzu5rbx2IVItVXZee228fSF3pJErsaR9k7YgUkVL3e+VHVxulLK4NipsR3BLEDheCnHxjf8V0Lh puIIsqm6XQDPji+scwRfOHlxdI2+2tYKL5sXCMup5P/lO+4BjTedBPEdLc1g3mL1ntZL5Haulah CmkvyawVbzFjC16tLDsX+SzJwTrc6tPAGCcO6x/Ri8gHkDBazkC+j5gp6YwYH5HcmwkAojuGPvs bCOhy49ZZsMIUm/b7MNiXTh3/etT6PabOO7pXLBJ+CGskMIxfljR7oLW3wfeNm4JO74NtvW34NX byvJcZ+Nx8+FyZfmlaBiMWNkqiL+pbHY+4iiP3SDiMK05gEvJ3e5gOa47YWHW3AsIk7XkXDvPJ2 /++s8XHfAGC5SFjBZosnIjodTLQVvfsYbeJFZ24KPnqj2XShqY+TL5auFolvQo4pF860UsFoVUu /kqjYQJubLQjmPpZkZWmX0MhBsrcxXkzFB+PTo547A1gygwILKaaoElGOo5RzHuY0bjpOw== X-Received: by 2002:a05:6a21:6f11:b0:3fa:cfec:226c with SMTP id adf61e73a8af0-4014d359919mr46307988637.48.1796329987164; Thu, 03 Dec 2026 12:33:07 -0800 (PST) Received: from phoenix.local (204-195-112-43.wavecable.com. [204.195.112.43]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8de0f109dbdsm179662b3a.8.2026.12.03.12.33.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 12:33:06 -0800 (PST) Date: Thu, 3 Dec 2026 12:33:05 -0800 From: Stephen Hemminger To: Dimon Zhao Cc: dev@dpdk.org, stable@dpdk.org, Leon Yu , Sam Chen Subject: Re: [PATCH v1 1/1] net/nbl: fix Tx VLAN fallback header overlap Message-ID: <20261203123305.73751143@phoenix.local> In-Reply-To: <20261202025050.3738018-2-dimon.zhao@nebula-matrix.com> References: <20261202025050.3738018-1-dimon.zhao@nebula-matrix.com> <20261202025050.3738018-2-dimon.zhao@nebula-matrix.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Wed, 2 Dec 2026 10:50:50 +0800 Dimon Zhao 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 > --- 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");