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

Tariq Toukan <[email protected]>
Newsgroups org.kernel.vger.linux-rdma,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>

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: [email protected]
> Assisted-by: Claude:claude-opus-4-8
> Assisted-by: Codex:gpt-5.6
> Assisted-by: Meta:internal-AI-tooling
> Signed-off-by: Glenn Judd <[email protected]>
> ---
> 
> 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/[email protected]/
> 
Hi,
Please note that I posted comments on v1, ~1h before your v2.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.