summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2026-01-05 13:17:19 +0300
committerJakub Kicinski <kuba@kernel.org>2026-01-07 04:06:03 +0300
commite9cd04b2816f8ebae9b274f5c52145c8f40d4a6f (patch)
tree35b95b8046ae2b3aea3dc5ed465d2970ca115077 /include/linux
parente4bc5dd53bf5d46cd58f081ffccc3809e2be5373 (diff)
downloadlinux-e9cd04b2816f8ebae9b274f5c52145c8f40d4a6f.tar.xz
udp: udplite is unlikely
Add some unlikely() annotations to speed up the fast path, at least with clang compiler. Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20260105101719.2378881-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/udp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/udp.h b/include/linux/udp.h
index 58795688a186..1cbf6b4d3aab 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
@@ -236,7 +236,7 @@ static inline void udp_allow_gso(struct sock *sk)
hlist_nulls_for_each_entry_rcu(__up, node, list, udp_lrpa_node)
#endif
-#define IS_UDPLITE(__sk) (__sk->sk_protocol == IPPROTO_UDPLITE)
+#define IS_UDPLITE(__sk) (unlikely(__sk->sk_protocol == IPPROTO_UDPLITE))
static inline struct sock *udp_tunnel_sk(const struct net *net, bool is_ipv6)
{