lkml.org 
[lkml]   [2013]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v8 net-next 2/7] net: add low latency socket poll
From
Date
On Mon, 2013-06-03 at 11:01 +0300, Eliezer Tamir wrote:
> 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>
> Tested-by: Willem de Bruijn <willemb@google.com>
> Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com>
> ---
...
> diff --git a/include/net/ll_poll.h b/include/net/ll_poll.h

> +
> +static inline bool sk_valid_ll(struct sock *sk)
> +{
> + return 0;

return false;

> +}
> +
> +static inline bool sk_poll_ll(struct sock *sk, int nonblock)
> +{
> + return 0;

return false;
> +}
> +
> +static inline void skb_mark_ll(struct sk_buff *skb, struct napi_struct *napi)
> +{
> +}


> /*
> * Before updating sk_refcnt, we must commit prior changes to memory
> * (Documentation/RCU/rculist_nulls.txt for details)
> diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
> index 741db5fc..ae98c95 100644
> --- a/net/core/sysctl_net_core.c
> +++ b/net/core/sysctl_net_core.c
> @@ -19,6 +19,7 @@
> #include <net/ip.h>
> #include <net/sock.h>
> #include <net/net_ratelimit.h>
> +#include <net/ll_poll.h>
>
> static int one = 1;
>
> @@ -284,6 +285,15 @@ static struct ctl_table net_core_table[] = {
> .proc_handler = flow_limit_table_len_sysctl
> },
> #endif /* CONFIG_NET_FLOW_LIMIT */
> +#ifdef CONFIG_NET_LL_RX_POLL
> + {
> + .procname = "low_latency_poll",
> + .data = &sysctl_net_ll_poll,
> + .maxlen = sizeof(unsigned long),
> + .mode = 0644,
> + .proc_handler = proc_dointvec

proc_doulongvec_minmax





\
 
 \ /
  Last update: 2013-06-03 15:43    [W:0.102 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site