From: Eric Dumazet Date: Fri, 30 Nov 2018 13:57:02 +0000 (-0800) Subject: tc: add a missing space between rate estimator and backlog X-Git-Tag: v4.20.0~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3adcbf3757b8ad7f5cac86985ef6335b7981d725;p=thirdparty%2Fiproute2.git tc: add a missing space between rate estimator and backlog 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 Reviewed-by: Jiri Pirko Signed-off-by: Stephen Hemminger --- diff --git a/tc/tc_util.c b/tc/tc_util.c index 82856a851..ab717890b 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);