aboutsummaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorEric Dumazet <[email protected]>2023-12-19 12:53:31 +0000
committerPaolo Abeni <[email protected]>2023-12-21 10:15:10 +0100
commit24ab059d2ebd62fdccc43794796f6ffbabe49ebc (patch)
treed455398c672c0ea254b3fa1a62b2bac2a02176d6 /lib/memory-notifier-error-inject.c
parentb8056f2ce07f27c43b9488dd1bc8bfbb60d0779d (diff)
net: check dev->gso_max_size in gso_features_check()
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: 82cc1a7a5687 ("[NET]: Add per-connection option to set max TSO frame size") Signed-off-by: Eric Dumazet <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions