All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2] tc: fix second printing of requeues
@ 2018-01-27  9:19 Jakub Kicinski
  2018-01-28  0:08 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Kicinski @ 2018-01-27  9:19 UTC (permalink / raw)
  To: stephen; +Cc: dsahern, jiri, netdev, oss-drivers, Jakub Kicinski

Non-JSON tc qdisc output used to print the "requeues" statistic
twice.  Commit 4fcec7f3665b ("tc: jsonify stats2") tried to preserve
this behaviour for both standard output and JSON, but used the wrong
statistic (q.qlen).  Also duplicating keys in JSON is not allowed,
so the second occurrence should be completely skipped with JSON.

Fixes: 4fcec7f3665b ("tc: jsonify stats2")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
---
 tc/tc_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tc/tc_util.c b/tc/tc_util.c
index 10e5aa91168a..aceb0d944933 100644
--- a/tc/tc_util.c
+++ b/tc/tc_util.c
@@ -846,7 +846,7 @@ void print_tcstats2_attr(FILE *fp, struct rtattr *rta, char *prefix, struct rtat
 		print_string(PRINT_FP, NULL, "backlog %s",
 			     sprint_size(q.backlog, b1));
 		print_uint(PRINT_ANY, "qlen", " %up", q.qlen);
-		print_uint(PRINT_ANY, "requeues", " requeues %u", q.qlen);
+		print_uint(PRINT_FP, NULL, " requeues %u", q.requeues);
 	}
 
 	if (xstats)
-- 
2.15.1

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

* Re: [PATCH iproute2] tc: fix second printing of requeues
  2018-01-27  9:19 [PATCH iproute2] tc: fix second printing of requeues Jakub Kicinski
@ 2018-01-28  0:08 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2018-01-28  0:08 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: dsahern, jiri, netdev, oss-drivers

On Sat, 27 Jan 2018 01:19:04 -0800
Jakub Kicinski <jakub.kicinski@netronome.com> wrote:

> Non-JSON tc qdisc output used to print the "requeues" statistic
> twice.  Commit 4fcec7f3665b ("tc: jsonify stats2") tried to preserve
> this behaviour for both standard output and JSON, but used the wrong
> statistic (q.qlen).  Also duplicating keys in JSON is not allowed,
> so the second occurrence should be completely skipped with JSON.
> 
> Fixes: 4fcec7f3665b ("tc: jsonify stats2")
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>

Also applied this fix

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

end of thread, other threads:[~2018-01-28  0:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-27  9:19 [PATCH iproute2] tc: fix second printing of requeues Jakub Kicinski
2018-01-28  0:08 ` Stephen Hemminger

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.