[PATCH net-next v2 0/2] bnxt_en: Fix SW USO padding
From: Joe Damato
Date: Fri Oct 09 2026 - 17:55:38 EST
Greetings:
As a followup to Eric's fix a51d233ccd48 ("bnxt_en: fix DMA mapping length
for padded small packets") which fixes padding for normal TX, this series
fixes padding for SW USO.
There are two cases I try to address:
1. The last segment could be shorter than BNXT_MIN_PKT_SIZE. So, add an
extra BD if needed to pad to that minimum.
2. The gso_size is so small that every segment would be shorter than
BNXT_MIN_PKT_SIZE (under 10 bytes with IPv4). This seems exceedingly
unlikely, but just in case, it is handled by clearing the GSO features
for these skbs so the stack segments them.
Patch 1 is a small refactor to move code into a helper that patch 2 uses to
avoid duplicating code.
I ran v1 on a bnxt machine and re-ran the uso.py test and it passed, but
the existing uso.py test doesn't test this specific case, so running the
test was more of a regression test. There were no functional changes to
v2.
Note that I did not see this issue in production and it should not be
possible for QUIC to hit this case on either ipv4 or ipv6 because QUIC
packets are at least 21 bytes. AFAIU, only ipv4 segments with less than 10
bytes of UDP payload can trigger this. As such, I was asked to send this
to net-next.
Thanks,
Joe
v2:
- Switched to net-next
- Added a comment as discussed with Michael in patch 2
- Added Michael's tags to patches 1 and 2
v1: https://lore.kernel.org/netdev/20261008191114.3736826-1-joe@xxxxxxx/
Joe Damato (2):
bnxt_en: Add helper to fill SW USO payload BDs
bnxt_en: Pad short SW USO segments to BNXT_MIN_PKT_SIZE
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 12 ++++
drivers/net/ethernet/broadcom/bnxt/bnxt_gso.c | 61 +++++++++++++++----
drivers/net/ethernet/broadcom/bnxt/bnxt_gso.h | 15 +++++
3 files changed, 75 insertions(+), 13 deletions(-)
base-commit: d8674294aefef02266c4d47ad10131f1bffbe534
--
2.53.0-Meta