All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] fq_codel: return non zero qlen in class dumps
@ 2016-06-06 16:12 Eric Dumazet
  2016-06-07 16:03 ` John Fastabend
  2016-06-07 23:28 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2016-06-06 16:12 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, John Fastabend

From: Eric Dumazet <edumazet@google.com>

We properly scan the flow list to count number of packets,
but John passed 0 to gnet_stats_copy_queue() so we report
a zero value to user space instead of the result.

Fixes: 640158536632 ("net: sched: restrict use of qstats qlen")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: John Fastabend <john.r.fastabend@intel.com>
---
 net/sched/sch_fq_codel.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index 6883a8971562..7a280360aeed 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -649,7 +649,7 @@ static int fq_codel_dump_class_stats(struct Qdisc *sch, unsigned long cl,
 		qs.backlog = q->backlogs[idx];
 		qs.drops = flow->dropped;
 	}
-	if (gnet_stats_copy_queue(d, NULL, &qs, 0) < 0)
+	if (gnet_stats_copy_queue(d, NULL, &qs, qs.qlen) < 0)
 		return -1;
 	if (idx < q->flows_cnt)
 		return gnet_stats_copy_app(d, &xstats, sizeof(xstats));

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] fq_codel: return non zero qlen in class dumps
  2016-06-06 16:12 [PATCH net] fq_codel: return non zero qlen in class dumps Eric Dumazet
@ 2016-06-07 16:03 ` John Fastabend
  2016-06-07 23:28 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: John Fastabend @ 2016-06-07 16:03 UTC (permalink / raw)
  To: Eric Dumazet, David Miller; +Cc: netdev, John Fastabend

On 16-06-06 09:12 AM, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
> 
> We properly scan the flow list to count number of packets,
> but John passed 0 to gnet_stats_copy_queue() so we report
> a zero value to user space instead of the result.
> 
> Fixes: 640158536632 ("net: sched: restrict use of qstats qlen")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: John Fastabend <john.r.fastabend@intel.com>
> ---
>  net/sched/sch_fq_codel.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
> index 6883a8971562..7a280360aeed 100644
> --- a/net/sched/sch_fq_codel.c
> +++ b/net/sched/sch_fq_codel.c
> @@ -649,7 +649,7 @@ static int fq_codel_dump_class_stats(struct Qdisc *sch, unsigned long cl,
>  		qs.backlog = q->backlogs[idx];
>  		qs.drops = flow->dropped;
>  	}
> -	if (gnet_stats_copy_queue(d, NULL, &qs, 0) < 0)
> +	if (gnet_stats_copy_queue(d, NULL, &qs, qs.qlen) < 0)
>  		return -1;
>  	if (idx < q->flows_cnt)
>  		return gnet_stats_copy_app(d, &xstats, sizeof(xstats));
> 
> 

Apparently I only passed zero in the sch_fq_codel case, strange. At
the moment I can't think of any reason other than it being a typo.

Thanks for fixing it!

Acked-by: John Fastabend <john.r.fastabend@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] fq_codel: return non zero qlen in class dumps
  2016-06-06 16:12 [PATCH net] fq_codel: return non zero qlen in class dumps Eric Dumazet
  2016-06-07 16:03 ` John Fastabend
@ 2016-06-07 23:28 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-06-07 23:28 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, john.r.fastabend

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 06 Jun 2016 09:12:39 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> We properly scan the flow list to count number of packets,
> but John passed 0 to gnet_stats_copy_queue() so we report
> a zero value to user space instead of the result.
> 
> Fixes: 640158536632 ("net: sched: restrict use of qstats qlen")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: John Fastabend <john.r.fastabend@intel.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-07 23:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-06 16:12 [PATCH net] fq_codel: return non zero qlen in class dumps Eric Dumazet
2016-06-07 16:03 ` John Fastabend
2016-06-07 23:28 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.