From: Eric Dumazet Date: Wed, 11 Apr 2012 23:05:28 +0000 (+0000) Subject: udp: intoduce udp_encap_needed static_key X-Git-Tag: v3.5-rc1~109^2~472 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=447167bf565a474ff0cfb0f41d54936937479e97;p=pandora-kernel.git 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 Cc: Simon Horman Cc: dev@openvswitch.org Signed-off-by: David S. Miller --- Reading git-diff-tree failed