Skip to content
Snippets Groups Projects
Commit 1f956594 authored by Yan Zhai's avatar Yan Zhai Committed by Frieder Schrempf
Browse files

udp: gso: do not drop small packets when PMTU reduces


[ Upstream commit 235174b2bed88501fda689c113c55737f99332d8 ]

Commit 4094871d ("udp: only do GSO if # of segs > 1") avoided GSO
for small packets. But the kernel currently dismisses GSO requests only
after checking MTU/PMTU on gso_size. This means any packets, regardless
of their payload sizes, could be dropped when PMTU becomes smaller than
requested gso_size. We encountered this issue in production and it
caused a reliability problem that new QUIC connection cannot be
established before PMTU cache expired, while non GSO sockets still
worked fine at the same time.

Ideally, do not check any GSO related constraints when payload size is
smaller than requested gso_size, and return EMSGSIZE instead of EINVAL
on MTU/PMTU check failure to be more specific on the error cause.

Fixes: 4094871d ("udp: only do GSO if # of segs > 1")
Signed-off-by: default avatarYan Zhai <yan@cloudflare.com>
Suggested-by: default avatarWillem de Bruijn <willemdebruijn.kernel@gmail.com>
Reviewed-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 633ef5f5
No related branches found
No related tags found
Loading
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