summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorEliezer Tamir <eliezer.tamir@linux.intel.com>2013-06-10 04:40:00 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-11 00:22:36 -0400
commita5b50476f77a8fcc8055c955720d05a7c2d9c532 (patch)
tree4b12eb7d102a3c0ce4799e00bc4a9c0b10026db7 /net/ipv6
parent060212928670593fb89243640bf05cf89560b023 (diff)
udp: add low latency socket poll support
Add upport for busy-polling on UDP sockets. In __udp[46]_lib_rcv add a call to sk_mark_ll() to copy the napi_id from the skb into the sk. This is done at the earliest possible moment, right after we identify which socket this skb is for. In __skb_recv_datagram When there is no data and the user tries to read we busy poll. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com> Acked-by: Eric Dumazet <edumazet@google.com> Tested-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/udp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index b5808539cd5c..f77e34c5a0e2 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -46,6 +46,7 @@
46#include <net/ip6_checksum.h> 46#include <net/ip6_checksum.h>
47#include <net/xfrm.h> 47#include <net/xfrm.h>
48#include <net/inet6_hashtables.h> 48#include <net/inet6_hashtables.h>
49#include <net/ll_poll.h>
49 50
50#include <linux/proc_fs.h> 51#include <linux/proc_fs.h>
51#include <linux/seq_file.h> 52#include <linux/seq_file.h>
@@ -841,7 +842,10 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
841 */ 842 */
842 sk = __udp6_lib_lookup_skb(skb, uh->source, uh->dest, udptable); 843 sk = __udp6_lib_lookup_skb(skb, uh->source, uh->dest, udptable);
843 if (sk != NULL) { 844 if (sk != NULL) {
844 int ret = udpv6_queue_rcv_skb(sk, skb); 845 int ret;
846
847 sk_mark_ll(sk, skb);
848 ret = udpv6_queue_rcv_skb(sk, skb);
845 sock_put(sk); 849 sock_put(sk);
846 850
847 /* a return value > 0 means to resubmit the input, but 851 /* a return value > 0 means to resubmit the input, but