From: Joe Damato <joe@dama.to>
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>
Cc: edumazet@google.com, horms@kernel.org, linux-kernel@vger.kernel.org
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 [thread overview]
Message-ID: <as1QpaiN8tTtZ1vx@devvm20253.cco0.facebook.com> (raw)
In-Reply-To: <20261009215426.2377946-3-joe@dama.to>
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/
prev parent reply other threads:[~2026-10-12 21:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 21:54 [PATCH net-next v2 0/2] bnxt_en: Fix SW USO padding Joe Damato
2026-10-09 21:54 ` [PATCH net-next v2 1/2] bnxt_en: Add helper to fill SW USO payload BDs Joe Damato
2026-10-09 21:54 ` [PATCH net-next v2 2/2] bnxt_en: Pad short SW USO segments to BNXT_MIN_PKT_SIZE Joe Damato
2026-10-10 22:55 ` netdev-bot+sashiko
2026-10-12 17:01 ` Joe Damato
2026-10-12 21:27 ` Joe Damato [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=as1QpaiN8tTtZ1vx@devvm20253.cco0.facebook.com \
--to=joe@dama.to \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.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
all inboxes | Powered by JetHome®