summaryrefslogtreecommitdiffstats
path: root/include/net/ip.h
diff options
context:
space:
mode:
authorShawn Bohrer <sbohrer@rgmadvisors.com>2013-10-07 18:01:40 +0200
committerDavid S. Miller <davem@davemloft.net>2013-10-08 22:27:33 +0200
commitfbf8866d65d5de84f75563eb0edd7fc27dbe9a90 (patch)
tree150188e64b62233edb22aefe9e57ed90196388da /include/net/ip.h
parentudp: ipv4: Add udp early demux (diff)
downloadlinux-fbf8866d65d5de84f75563eb0edd7fc27dbe9a90.tar.xz
linux-fbf8866d65d5de84f75563eb0edd7fc27dbe9a90.zip
net: ipv4 only populate IP_PKTINFO when needed
The since the removal of the routing cache computing fib_compute_spec_dst() does a fib_table lookup for each UDP multicast packet received. This has introduced a performance regression for some UDP workloads. This change skips populating the packet info for sockets that do not have IP_PKTINFO set. Benchmark results from a netperf UDP_RR test: Before 89789.68 transactions/s After 90587.62 transactions/s Benchmark results from a fio 1 byte UDP multicast pingpong test (Multicast one way unicast response): Before 12.63us RTT After 12.48us RTT Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip.h')
-rw-r--r--include/net/ip.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index 16078f422397..b39ebe5339ac 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -459,7 +459,7 @@ int ip_options_rcv_srr(struct sk_buff *skb);
* Functions provided by ip_sockglue.c
*/
-void ipv4_pktinfo_prepare(struct sk_buff *skb);
+void ipv4_pktinfo_prepare(const struct sock *sk, struct sk_buff *skb);
void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb);
int ip_cmsg_send(struct net *net, struct msghdr *msg, struct ipcm_cookie *ipc);
int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval,