aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/ulpqueue.c
diff options
context:
space:
mode:
authorNeil Horman <nhorman@tuxdriver.com>2014-04-17 15:26:51 -0400
committerDavid S. Miller <davem@davemloft.net>2014-04-20 18:18:55 -0400
commit8465a5fcd1ceba8f2b55121d47b73f4025401490 (patch)
tree3e4d11d4a9452569be5e4a94a1d1cc8e90050408 /net/sctp/ulpqueue.c
parent85da101f54bf40aecc258ab0c2e9e26f9d58a361 (diff)
sctp: add support for busy polling to sctp protocol
The busy polling socket option adds support for sockets to busy wait on data arriving on the napi queue from which they have most recently received a frame. Currently only tcp and udp support this feature, but theres no reason sctp can't do so as well. Add it in so appliations can take advantage of it Signed-off-by: Neil Horman <nhorman@tuxdriver.com> CC: Vlad Yasevich <vyasevich@gmail.com> CC: "David S. Miller" <davem@davemloft.net> CC: Daniel Borkmann <dborkman@redhat.com> CC: netdev@vger.kernel.org Acked-by: Vlad Yasevich <vyasevich@gmail.com> Acked-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/ulpqueue.c')
-rw-r--r--net/sctp/ulpqueue.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
index 7144eb6a1b95..d49dc2ed30ad 100644
--- a/net/sctp/ulpqueue.c
+++ b/net/sctp/ulpqueue.c
@@ -38,6 +38,7 @@
38#include <linux/types.h> 38#include <linux/types.h>
39#include <linux/skbuff.h> 39#include <linux/skbuff.h>
40#include <net/sock.h> 40#include <net/sock.h>
41#include <net/busy_poll.h>
41#include <net/sctp/structs.h> 42#include <net/sctp/structs.h>
42#include <net/sctp/sctp.h> 43#include <net/sctp/sctp.h>
43#include <net/sctp/sm.h> 44#include <net/sctp/sm.h>
@@ -204,6 +205,9 @@ int sctp_ulpq_tail_event(struct sctp_ulpq *ulpq, struct sctp_ulpevent *event)
204 if (sock_flag(sk, SOCK_DEAD) || (sk->sk_shutdown & RCV_SHUTDOWN)) 205 if (sock_flag(sk, SOCK_DEAD) || (sk->sk_shutdown & RCV_SHUTDOWN))
205 goto out_free; 206 goto out_free;
206 207
208 if (!sctp_ulpevent_is_notification(event))
209 sk_mark_napi_id(sk, skb);
210
207 /* Check if the user wishes to receive this event. */ 211 /* Check if the user wishes to receive this event. */
208 if (!sctp_ulpevent_is_enabled(event, &sctp_sk(sk)->subscribe)) 212 if (!sctp_ulpevent_is_enabled(event, &sctp_sk(sk)->subscribe))
209 goto out_free; 213 goto out_free;