# 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 
- List: netdev
- Page: https://ratatoskr.run/netdev/2026/08/17361836
- Thread: https://ratatoskr.run/netdev/2026/07/17350751/t.md

```text


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/
>
Hi,
Please note that I posted comments on v1, ~1h before your v2.
```
