[PATCH net 0/2] bnxt_en: Fix SW USO padding

From: Joe Damato

Date: Thu Oct 08 2026 - 15:12:24 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 this 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.

Thanks,
Joe

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 | 56 ++++++++++++++-----
drivers/net/ethernet/broadcom/bnxt/bnxt_gso.h | 15 +++++
3 files changed, 70 insertions(+), 13 deletions(-)


base-commit: 6d25ffca055a77787c21a36b66c253f76239411b
--
2.53.0-Meta