ipv6: refactor ip6_finish_output for GSO handling
authorYan Zhai <yan@cloudflare.com>
Tue, 24 Oct 2023 14:26:37 +0000 (07:26 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 26 Oct 2023 01:04:29 +0000 (18:04 -0700)
commit1f7ec1b3721d7f49f13d01e6f5ed5f28a305e3b6
treee3fcb2c9e010a9cc44fd0a820df958ffbb99170e
parente57a34478586fe3562560ccebd655b707a5b4a56
ipv6: refactor ip6_finish_output for GSO handling

Separate GSO and non-GSO packets handling to make the logic cleaner. For
GSO packets, frag_max_size check can be omitted because it is only
useful for packets defragmented by netfilter hooks. Both local output
and GRO logic won't produce GSO packets when defragment is needed. This
also mirrors what IPv4 side code is doing.

Suggested-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Yan Zhai <yan@cloudflare.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/0e1d4599f858e2becff5c4fe0b5f843236bc3fe8.1698156966.git.yan@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/ip6_output.c