Skip to content
Snippets Groups Projects
Commit c04b7b28 authored by Eric Dumazet's avatar Eric Dumazet Committed by Greg Kroah-Hartman
Browse files

net: check dev->gso_max_size in gso_features_check()


[ Upstream commit 24ab059d ]

Some drivers might misbehave if TSO packets get too big.

GVE for instance uses a 16bit field in its TX descriptor,
and will do bad things if a packet is bigger than 2^16 bytes.

Linux TCP stack honors dev->gso_max_size, but there are
other ways for too big packets to reach an ndo_start_xmit()
handler : virtio_net, af_packet, GRO...

Add a generic check in gso_features_check() and fallback
to GSO when needed.

gso_max_size was added in the blamed commit.

Fixes: 82cc1a7a ("[NET]: Add per-connection option to set max TSO frame size")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20231219125331.4127498-1-edumazet@google.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 761ee09e
No related branches found
No related tags found
2 merge requests!186🤖 Sync Bot: Update v5.4-ktn to Latest Stable Kernel (v5.4.290),!174🤖 Sync Bot: Update v5.4-ktn to Latest Stable Kernel (v5.4.286)
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment