Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

udp: remove udp_tunnel_gro_init()

Use DEFINE_MUTEX() to initialize udp_tunnel_gro_type_lock.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250707091634.311974-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Eric Dumazet and committed by
Jakub Kicinski
ea988b45 8a00a173

+1 -9
+1 -9
net/ipv4/udp_offload.c
··· 44 44 45 45 DEFINE_STATIC_CALL(udp_tunnel_gro_rcv, dummy_gro_rcv); 46 46 static DEFINE_STATIC_KEY_FALSE(udp_tunnel_static_call); 47 - static struct mutex udp_tunnel_gro_type_lock; 47 + static DEFINE_MUTEX(udp_tunnel_gro_type_lock); 48 48 static struct udp_tunnel_type_entry udp_tunnel_gro_types[UDP_MAX_TUNNEL_TYPES]; 49 49 static unsigned int udp_tunnel_gro_type_nr; 50 50 static DEFINE_SPINLOCK(udp_tunnel_gro_lock); ··· 144 144 } 145 145 EXPORT_SYMBOL_GPL(udp_tunnel_update_gro_rcv); 146 146 147 - static void udp_tunnel_gro_init(void) 148 - { 149 - mutex_init(&udp_tunnel_gro_type_lock); 150 - } 151 - 152 147 static struct sk_buff *udp_tunnel_gro_rcv(struct sock *sk, 153 148 struct list_head *head, 154 149 struct sk_buff *skb) ··· 159 164 } 160 165 161 166 #else 162 - 163 - static void udp_tunnel_gro_init(void) {} 164 167 165 168 static struct sk_buff *udp_tunnel_gro_rcv(struct sock *sk, 166 169 struct list_head *head, ··· 993 1000 }, 994 1001 }; 995 1002 996 - udp_tunnel_gro_init(); 997 1003 return inet_add_offload(&net_hotdata.udpv4_offload, IPPROTO_UDP); 998 1004 }