]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ipv6: add some unlikely()/likely() clauses in ip6_output.c
authorEric Dumazet <edumazet@google.com>
Fri, 30 Jan 2026 21:02:57 +0000 (21:02 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 3 Feb 2026 01:49:29 +0000 (17:49 -0800)
commit2855e4925416c5900a9c6cece11f4a2e56bf6e63
treeb0a7dcb0d1ba6ce960ff7d143aa37fae5779ca24
parent1bc46dd209667346c5aa56c351995e7c260696d0
ipv6: add some unlikely()/likely() clauses in ip6_output.c

1) daddr is unlikely a multicast in ip6_finish_output2().

2) ip6_finish_output_gso_slowpath_drop() should not be called often.

3) ip6_fragment() should not be called often.

4) opt is unlikely to be set.

5) ip6_xmit() and ip6_forward() mostly sends not too big packets.

6) Most __ip6_make_skb() calls are for UDP packets,
   not ICMPV6 ones.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260130210303.3888261-3-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/ip6_output.c