netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leslie Monis <lesliemonis@gmail.com>
To: stephen@networkplumber.org
Cc: netdev@vger.kernel.org, Leslie Monis <lesliemonis@gmail.com>
Subject: [PATCH iproute2 1/2] tc: pie: change maximum integer value of tc_pie_xstats->prob
Date: Sun, 24 Mar 2019 00:18:34 +0530	[thread overview]
Message-ID: <20190323184835.20456-2-lesliemonis@gmail.com> (raw)
In-Reply-To: <20190323184835.20456-1-lesliemonis@gmail.com>

tc_pie_xstats->prob has a maximum value of (2^64 - 1).

Signed-off-by: Leslie Monis <lesliemonis@gmail.com>
---
 tc/q_pie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tc/q_pie.c b/tc/q_pie.c
index f7924ef5..6566ca10 100644
--- a/tc/q_pie.c
+++ b/tc/q_pie.c
@@ -198,7 +198,7 @@ static int pie_print_xstats(struct qdisc_util *qu, FILE *f,
 	st = RTA_DATA(xstats);
 	/*prob is returned as a fracion of maximum integer value */
 	fprintf(f, "prob %f delay %uus avg_dq_rate %u\n",
-		(double)st->prob / (double)0xffffffff, st->delay,
+		(double)st->prob / (double)0xffffffffffffffff, st->delay,
 		st->avg_dq_rate);
 	fprintf(f, "pkts_in %u overlimit %u dropped %u maxq %u ecn_mark %u\n",
 		st->packets_in, st->overlimit, st->dropped, st->maxq,
-- 
2.17.1


  reply	other threads:[~2019-03-23 18:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-23 18:48 [PATCH iproute2 0/2] tc: pie: make tc/q_pie.c consistent with the kernel Leslie Monis
2019-03-23 18:48 ` Leslie Monis [this message]
2019-03-27 14:53   ` [PATCH iproute2 1/2] tc: pie: change maximum integer value of tc_pie_xstats->prob Stephen Hemminger
2019-03-27 15:24     ` Leslie Monis
2019-03-23 18:48 ` [PATCH iproute2 2/2] tc: pie: update man page Leslie Monis
2019-03-27 14:54   ` Stephen Hemminger
2019-03-27 15:25     ` Leslie Monis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190323184835.20456-2-lesliemonis@gmail.com \
    --to=lesliemonis@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).