Re: [PATCH v8 net-next 2/7] net: add low latency socket poll
From: Eric Dumazet
Date: Mon Jun 03 2013 - 09:05:42 EST
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@xxxxxxxxx>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@xxxxxxxxx>
> Tested-by: Willem de Bruijn <willemb@xxxxxxxxxx>
> Signed-off-by: Eliezer Tamir <eliezer.tamir@xxxxxxxxxxxxxxx>
> ---
...
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/