Article View: linux.kernel.netdev
Article #2522Re: [PATCH net-next v2 2/2] bnxt_en: Pad short SW USO segments to BNXT_MIN_PKT_SIZE
From: Joe Damato
Date: Mon, 12 Oct 2026 21:27
Date: Mon, 12 Oct 2026 21:27
30 lines
9661 bytes
9661 bytes
On Fri, Oct 09, 2026 at 02:54:24PM -0700, Joe Damato wrote: > Each SW USO segment is hdr_len + seg_payload bytes. With IPv4, hdr_len > is 42 bytes, so a segment carrying less than 10 bytes of UDP payload is > sent shorter than BNXT_MIN_PKT_SIZE. This happens with a short last > segment (e.g. gso_size 1400 and 1405 bytes of payload) or with a > gso_size below 10 bytes. [...] > diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_gso.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_gso.c > index ef04c9d08066..80d5c4f963a9 100644 > --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_gso.c > +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_gso.c > @@ -82,11 +82,19 @@ int bnxt_sw_udp_gso_xmit(struct bnxt *bp, struct bnxt_tx_ring_info *txr, > if (unlikely(num_segs <= 1)) > goto drop; > > + /* bnxt_features_check() makes the stack segment these, but paths > + * that skip validate_xmit_skb() (e.g. generic XDP_TX of a GRO'd > + * skb) can still get here. Padding every segment would need more > + * BDs than bds_needed reserves below, so drop instead. > + */ > + if (unlikely(bnxt_sw_gso_pad_len(hdr_len, mss))) > + goto drop; > + I could be wrong, but I think if [1] is applied this drop can go away (?) [1]: https://lore.kernel.org/netdev/20260928223648.2739371-6-kuba@kernel.org/
Technical Details
Message-ID:
<as1QpaiN8tTtZ1vx@devvm20253.cco0.facebook.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-345233-linux-kernel-netdev=dewy.ruReferences:
<20261009215426.2377946-1-joe@dama.to> <20261009215426.2377946-3-joe@dama.to>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-345233-linux-kernel-netdev=dewy.ru
From: joe@dama.to (Joe Damato)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v2 2/2] bnxt_en: Pad short SW USO segments to
BNXT_MIN_PKT_SIZE
Date: Mon, 12 Oct 2026 14:27:01 -0700
Organization: Usenet Network
Message-ID: <as1QpaiN8tTtZ1vx@devvm20253.cco0.facebook.com>
References: <20261009215426.2377946-1-joe@dama.to>
<20261009215426.2377946-3-joe@dama.to>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
logging-data="1889139"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Mt+eY7kBXFvTO4kNFg5dx456Lc8= sha256:+XvmlERaTHdP1tBy1SAjtputkoTb1EI+KMy+hJhKivI=
sha1:BiqkD0nZ3TI54vTmIqUDA7Ra7EQ= sha256:fQBpIt/Qpf0NtAGsJgN7+fQbo9iHbZX4Q9faD+8nf4Y=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 5778E10FCEE; Tue, 13 Oct 2026 00:27:24 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -0.651
X-Spam-Status: No, score=-0.651 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=dama-to.20251104.gappssmtp.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id YOwFXAYvVmxI;
Tue, 13 Oct 2026 00:27:20 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-345233-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=dama.to
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
by mail.dewy.ru (Postfix) with ESMTPS id E514B10FCE4; Tue, 13 Oct 2026 00:27:11 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
by sin.lore.kernel.org (Postfix) with ESMTP id 5A7B32819F; Mon, 12 Oct 2026 21:27:07 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A3464F55DB;
Mon, 12 Oct 2026 21:27:05 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=dama-to.20251104.gappssmtp.com header.i=@dama-to.20251104.gappssmtp.com header.b="UuPUM0He"
X-Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 081E04F7CB2
for <netdev@vger.kernel.org>; Mon, 12 Oct 2026 21:27:03 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1791840425; cv=none; b=GwoCqpozpWPbnFEZvFO1goLl33vKAcUgLFcVhiLsXcfx7bQbZAMWu3zF4y6rgz+ScgQajaAI7rsf4R+CgEIWyLwlrz7IJgqynHBe/2I38udFMQjDNSg2x4T5kyjlNHfn7QyNqjIa1nV1PSVC3F4N58meCrx/QsbVMFTvkjVE1tw=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1791840425; c=relaxed/simple;
bh=vFCTPi6RkqhF5HPuqeIigpw8olvShpvLUVqeUIoJdYg=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=pSvUJPE4N/L/+duKKo0sqJLF7Vz0sJ464Ls9foEh3D21AtKsHM85U29IOM+l0Am/dKDpgWIDkvzIBBWuZRbb4BloyhQ4hgewFe12y0RYunzKmght6BFhlVqtrqvtpdU5YSldcDen/fmQ+bq+eZLegb1y7q8EKw0krPIq3bCrhlQ=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dama.to; spf=none smtp.mailfrom=dama.to; dkim=pass (2048-bit key) header.d=dama-to.20251104.gappssmtp.com header.i=@dama-to.20251104.gappssmtp.com header.b=UuPUM0He; arc=none smtp.client-ip=209.85.210.176
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dama.to
X-Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=dama.to
X-Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-881269371acso2062311b3a.0
for <netdev@vger.kernel.org>; Mon, 12 Oct 2026 14:27:03 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=dama-to.20251104.gappssmtp.com; s=20251104; t=1791840423; x=1792445223; darn=vger.kernel.org;
h=in-reply-to:content-disposition:content-type:mime-version
:references:mail-followup-to:message-id:subject:cc:to:from:date:from
:to:cc:subject:date:message-id:reply-to:content-type;
bh=00lr0ueSHjjLFpqBUflLoQS+JH73YrWnwKwvoX92I9o=;
b=UuPUM0HeTJ/ADEIghcha+FZah2r1LoSTx/oKR1mcAhddvveQVx+4banNqP2RU3CsTY
LJ++V2f0XycCs4OQM6j3dOCi6hmgN3I4a8ATKZmItwuAeFCIyAYiX63tMUmNaQWXeqxA
FRo9JNB3KvPQjw97HmOqQMAZsH5OM2xHx1E5PcmH8ODMIXZOgEV9UHxwryORjEAM539C
k1h4aIjiBHEEI6b3aCwPPZBxbriyEzUxl4P+CQQYn7av7Rx1194ZgGy+P1sOpMKVKiVa
o5B4e38Yv9ieFFKRRqYzydXFevulTXLoTGVb6YqtbgNIWFIv7Wy51EHhDGn3CIb8oRyR
+13w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1791840423; x=1792445223;
h=in-reply-to:content-disposition:content-type:mime-version
:references:mail-followup-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=00lr0ueSHjjLFpqBUflLoQS+JH73YrWnwKwvoX92I9o=;
b=yHZHAh8isOWC7qfz6JSYxoFtk+xKoug6g0wpTw/DstBBgZ4ntwPp8c6MH8dDiR6Z74
C5K8WbgkANkiDQD1IjWf13owJnO0wCDaaaG5V+UygHTsMV1SUwWTH27OaYmw7Agelf21
Uk6PsLWrzOihKv01zIG/OwfookI9VAVSXfOUf/TEGlRUh5JYGyF0OG+lk9rNa8sClNMM
O8eMoJCtRLHWAtJ9yG5cVGyAOyqGr8zrGj5x2QkK4kcKeQy4/rf+PtoD585kaM/gRc2K
TGn8j14HtUxE1ZrUokVQMaDWRLhvKZIZqHm5ongKheFlX85NY9Dk6Isi6Mz0c6s/abik
ZyUg==
X-Gm-Message-State: AFq9FYJzi3+i0LjrmFj3o6IhRk1dkLuCghvPltzXedM7d0udNaBj1lBU
1YStxIQgAgVzm+YxwQpPMiIDqupbgzzzO8C+C8H97P33SWlCeJ9Nw6TbjT5WRpC+WlWHeImUvMZ
LeQRd
X-Gm-Gg: AYBFou0SfrhROrW9Dws537CZFCwAEhx8fsK93Y2zbB6DBdGsudBVOBmDnWuGvnnmVpz
SqL+aJPKe/qHzkkJ3r+8w/mFQhuoGwQa7YwZJsLEXAAn9X7+QGTAXi3U3iZRTF/Z4VFhyikJOh2
dYz5LkYNOvJu1g1M1sbHr7w3V1xpwAPzrvEqdYrbMkf8dPPuAWFNKNGicsJLeRgTgF6BE79a/rY
tulsGGDX6YCOjf2ygTUDVRc/hamHj55JjeMu2KEW/uXfgL2uW5Q2gyOq2FVlSwN3mRF66pWpIn7
TrGBl0Uo1nj6to2v9HjlwYiR+U+sXDJei7PJxCRThc8/dmf7ytpJKCkE8Sm5vthnrcTg8G+J0OI
uD1rkkXzjzJy+RRTv2DB4MPV4V4c6UDvJmB79J39pr6xKsTQFo2y15seRTEWtRTitdHyLaFp5MV
L5UNhr7Ckfd6DhMtkw9G7GnSIAYXkc6WaY+fjqP62VIqpijl1xnHVYxXJuLh2G0CPyPDF73L1UT
XexD0lhrjI61VDwKuOMZCU=
X-Received: by 2002:a05:6300:6698:b0:3e1:4fbc:5ce9 with SMTP id adf61e73a8af0-3e164f32a4emr6971521637.20.1791840423279;
Mon, 12 Oct 2026 14:27:03 -0700 (PDT)
X-Received: from localhost ([2a03:2880:2ff:58::])
by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-cd3d9e53f8bsm4705338a12.24.2026.10.12.14.27.02
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Mon, 12 Oct 2026 14:27:02 -0700 (PDT)
X-Cc: edumazet@google.com, horms@kernel.org, linux-kernel@vger.kernel.org
X-Mail-Followup-To: Joe Damato <joe@dama.to>, netdev@vger.kernel.org,
Michael Chan <michael.chan@broadcom.com>,
Pavan Chebbi <pavan.chebbi@broadcom.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
edumazet@google.com, horms@kernel.org, linux-kernel@vger.kernel.org
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-In-Reply-To: <20261009215426.2377946-3-joe@dama.to>