Re: [PATCH net v2] net/mlx5e: strip runt Ethernet padding in HW-GRO (SHAMPO)

From
Tariq Toukan <tariqt@nvidia.com>
Date
2026-08-04 07:24:40
Also in
linux-rdma, lkml
Reply to
Glenn Judd, 2026-08-03

On 04/08/2026 0:44, Glenn Judd wrote:
When hardware GRO (SHAMPO) coalesces a small IPv4/TCP segment
that was padded up to the 60-byte minimum Ethernet frame, the trailing
padding is folded into the merged payload.

The selftest tools/testing/selftests/drivers/net/hw/gro.py subtest
hw_ipv4_data_lrg_1byte sends {100, 1} expecting to receive {101}.
In current code, it receives {106} (100 + 1 payload + 5 pad) instead.

Fix is to compute the real (unpadded) frame length from the segment's
IPv4 total (padded) length and drop the padding before it is merged.

Fixes: 92552d3abd32 ("net/mlx5e: HW_GRO cqe handler implementation")
Cc: <redacted>
Assisted-by: Claude:claude-opus-4-8
Assisted-by: Codex:gpt-5.6
Assisted-by: Meta:internal-AI-tooling
Signed-off-by: Glenn Judd <redacted>
---

Notes:
     v2:
      - No functional change.
      - Address the netdev checkpatch 80-column warning.
      - Add a comment noting the IPv4 header offset intentionally mirrors the
        driver's existing no-IP-options logic (raised in review).
        Changing that logic is outside the scope of this change.
     v1: https://lore.kernel.org/netdev/20260731185442.2778723-1-gmj@meta.com/ (local)
Hi,
Please note that I posted comments on v1, ~1h before your v2.
Thread (4 messages) 4 messages, 2 authors, last reply 2026-08-04
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help