diff options
author | Eliezer Tamir <eliezer.tamir@linux.intel.com> | 2013-06-10 04:39:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-11 00:22:35 -0400 |
commit | 060212928670593fb89243640bf05cf89560b023 (patch) | |
tree | 32ae5c7be094983fb06430dbe09d36e2b317ca9c /include/net/sock.h | |
parent | af12fa6e46aa651e7b86a4c4117b562518fef184 (diff) |
net: add low latency socket poll
Adds an ndo_ll_poll method and the code that supports it.
This method can be used by low latency applications to busy-poll
Ethernet device queues directly from the socket code.
sysctl_net_ll_poll controls how many microseconds to poll.
Default is zero (disabled).
Individual protocol support will be added by subsequent patches.
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 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 66772cf8c3c5..ac8e1818380c 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -229,6 +229,7 @@ struct cg_proto; | |||
229 | * @sk_omem_alloc: "o" is "option" or "other" | 229 | * @sk_omem_alloc: "o" is "option" or "other" |
230 | * @sk_wmem_queued: persistent queue size | 230 | * @sk_wmem_queued: persistent queue size |
231 | * @sk_forward_alloc: space allocated forward | 231 | * @sk_forward_alloc: space allocated forward |
232 | * @sk_napi_id: id of the last napi context to receive data for sk | ||
232 | * @sk_allocation: allocation mode | 233 | * @sk_allocation: allocation mode |
233 | * @sk_sndbuf: size of send buffer in bytes | 234 | * @sk_sndbuf: size of send buffer in bytes |
234 | * @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, | 235 | * @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, |
@@ -325,6 +326,9 @@ struct sock { | |||
325 | #ifdef CONFIG_RPS | 326 | #ifdef CONFIG_RPS |
326 | __u32 sk_rxhash; | 327 | __u32 sk_rxhash; |
327 | #endif | 328 | #endif |
329 | #ifdef CONFIG_NET_LL_RX_POLL | ||
330 | unsigned int sk_napi_id; | ||
331 | #endif | ||
328 | atomic_t sk_drops; | 332 | atomic_t sk_drops; |
329 | int sk_rcvbuf; | 333 | int sk_rcvbuf; |
330 | 334 | ||