diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2012-04-12 01:05:28 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-13 19:39:37 +0200 |
commit | 447167bf565a474ff0cfb0f41d54936937479e97 (patch) | |
tree | 38b03cb4e23bec19939545575e36f7395c5b156e /net/core/neighbour.c | |
parent | net: WIZnet drivers: fix possible NULL dereference (diff) | |
download | linux-447167bf565a474ff0cfb0f41d54936937479e97.tar.xz linux-447167bf565a474ff0cfb0f41d54936937479e97.zip |
udp: intoduce udp_encap_needed static_key
Most machines dont use UDP encapsulation (L2TP)
Adds a static_key so that udp_queue_rcv_skb() doesnt have to perform a
test if L2TP never setup the encap_rcv on a socket.
Idea of this patch came after Simon Horman proposal to add a hook on TCP
as well.
If static_key is not yet enabled, the fast path does a single JMP .
When static_key is enabled, JMP destination is patched to reach the real
encap_type/encap_rcv logic, possibly adding cache misses.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: dev@openvswitch.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/neighbour.c')
0 files changed, 0 insertions, 0 deletions