lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 2 Sep 2014 17:23:47 +0200
From:	Jesper Dangaard Brouer <brouer@...hat.com>
To:	Jesper Dangaard Brouer <brouer@...hat.com>
Cc:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	Florian Westphal <fw@...len.de>,
	Hannes Frederic Sowa <hannes@...essinduktion.org>,
	Daniel Borkmann <dborkman@...hat.com>
Subject: Re: [net-next PATCH 3/3] qdisc: sysctl to adjust bulk dequeue limit

On Tue, 02 Sep 2014 16:36:09 +0200
Jesper Dangaard Brouer <brouer@...hat.com> wrote:

> Allow userspace to adjust how many packet the qdisc is allowed to
> bulk dequeue.
> 
> Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com>
> 
> ---
> Question should we allow this to be adjusted?
> 
>  include/net/sch_generic.h  |    2 ++
>  net/core/sysctl_net_core.c |    9 +++++++++
>  net/sched/sch_generic.c    |    4 +++-
>  3 files changed, 14 insertions(+), 1 deletions(-)
> 
> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
> index a3cfb8e..b0ac7b5 100644
> --- a/include/net/sch_generic.h
> +++ b/include/net/sch_generic.h
> @@ -14,6 +14,8 @@ struct qdisc_walker;
>  struct tcf_walker;
>  struct module;
>  
> +extern int qdisc_bulk_dequeue_limit;
> +
>  struct qdisc_rate_table {
>  	struct tc_ratespec rate;
>  	u32		data[256];
> diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
> index cf9cd13..5505841 100644
> --- a/net/core/sysctl_net_core.c
> +++ b/net/core/sysctl_net_core.c
> @@ -361,6 +361,15 @@ static struct ctl_table net_core_table[] = {
>  		.mode		= 0644,
>  		.proc_handler	= proc_dointvec
>  	},
> +	{
> +		.procname	= "qdisc_bulk_dequeue_limit",
> +		.data		= &qdisc_bulk_dequeue_limit,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.extra1		= &zero,
> +		.extra2		= &ushort_max,
> +		.proc_handler	= proc_dointvec_minmax
> +	},
>  	{ }
>  };
>  
> diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
> index 30814ef..9cb08c0 100644
> --- a/net/sched/sch_generic.c
> +++ b/net/sched/sch_generic.c
> @@ -34,6 +34,8 @@
>  const struct Qdisc_ops *default_qdisc_ops = &pfifo_fast_ops;
>  EXPORT_SYMBOL(default_qdisc_ops);
>  
> +int qdisc_bulk_dequeue_limit __read_mostly = 7;
> +
>  /* Main transmission queue. */
>  
>  /* Modifications to data participating in scheduling must be protected with
> @@ -81,7 +83,7 @@ static inline struct sk_buff *dequeue_skb(struct Qdisc *q)
>  			/* bulk dequeue */
>  			if (skb && !skb->next && (q->flags & TCQ_F_ONETXQUEUE)) {

Will update the patch with:
-                       if (skb && !skb->next && (q->flags & TCQ_F_ONETXQUEUE)) {
+                       if (qdisc_bulk_dequeue_limit && skb &&
+                           !skb->next && (q->flags & TCQ_F_ONETXQUEUE)) {

To allow qdisc_bulk_dequeue_limit==0 to actually disable bulking.



>  				struct sk_buff *new, *head = skb;
> -				int limit = 7;
> +				int limit = qdisc_bulk_dequeue_limit;
>  
>  				do {
>  					new = q->dequeue(q);
> 



-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Sr. Network Kernel Developer at Red Hat
  Author of http://www.iptv-analyzer.org
  LinkedIn: http://www.linkedin.com/in/brouer
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ