udp: gro behind static key
Avoid the socket lookup cost in udp_gro_receive if no socket has a udp tunnel callback configured. udp_sk(sk)->gro_receive requires a registration with setup_udp_tunnel_sock, which enables the static key. Signed-off-by: Willem de Bruijn <willemb@google.com> Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
2b9156129f
commit
f2e9de210d
@@ -548,7 +548,7 @@ static __inline__ void udpv6_err(struct sk_buff *skb,
|
||||
__udp6_lib_err(skb, opt, type, code, offset, info, &udp_table);
|
||||
}
|
||||
|
||||
static DEFINE_STATIC_KEY_FALSE(udpv6_encap_needed_key);
|
||||
DEFINE_STATIC_KEY_FALSE(udpv6_encap_needed_key);
|
||||
void udpv6_encap_enable(void)
|
||||
{
|
||||
static_branch_enable(&udpv6_encap_needed_key);
|
||||
|
Reference in New Issue
Block a user