From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: [PATCH iproute2] tc: add a missing space between rate estimator and backlog Date: Fri, 30 Nov 2018 05:57:02 -0800 Message-ID: <20181130135702.72297-1-edumazet@google.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: netdev , Eric Dumazet , Eric Dumazet , Jiri Pirko To: David Ahern , Stephen Hemminger Return-path: Received: from mail-pl1-f193.google.com ([209.85.214.193]:38983 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726070AbeLABGa (ORCPT ); Fri, 30 Nov 2018 20:06:30 -0500 Received: by mail-pl1-f193.google.com with SMTP id 101so2848450pld.6 for ; Fri, 30 Nov 2018 05:57:07 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: When a rate estimator is active, "tc -s qd" displays something like : rate 12616bit 11ppsbacklog 0b 0p requeues 2 instead of : rate 12616bit 11pps backlog 0b 0p requeues 2 Fixes: 4fcec7f3665b ("tc: jsonify stats2") Signed-off-by: Eric Dumazet Cc: Jiri Pirko --- tc/tc_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tc/tc_util.c b/tc/tc_util.c index 82856a85170b6fdb2dfab42a8487882afbf6c93d..ab717890bb2a44b4c53a756bd8350b4ed4428a22 100644 --- a/tc/tc_util.c +++ b/tc/tc_util.c @@ -838,8 +838,9 @@ void print_tcstats2_attr(FILE *fp, struct rtattr *rta, char *prefix, struct rtat memcpy(&q, RTA_DATA(tbs[TCA_STATS_QUEUE]), MIN(RTA_PAYLOAD(tbs[TCA_STATS_QUEUE]), sizeof(q))); if (!tbs[TCA_STATS_RATE_EST]) - print_string(PRINT_FP, NULL, "\n%s", prefix); + print_string(PRINT_FP, NULL, "\n", ""); print_uint(PRINT_JSON, "backlog", NULL, q.backlog); + print_string(PRINT_FP, NULL, "%s", prefix); print_string(PRINT_FP, NULL, "backlog %s", sprint_size(q.backlog, b1)); print_uint(PRINT_ANY, "qlen", " %up", q.qlen); -- 2.20.0.rc1.387.gf8505762e3-goog