From: Leslie Monis <lesliemonis@gmail.com>
To: Linux NetDev <netdev@vger.kernel.org>
Cc: David Ahern <dsahern@gmail.com>,
Stephen Hemminger <stephen@networkplumber.org>,
"Mohit P . Tahiliani" <tahiliani@nitk.edu.in>,
Gautam Ramakrishnan <gautamramk@gmail.com>
Subject: [PATCH iproute2-next] tc: pie: change maximum integer value of tc_pie_xstats->prob
Date: Thu, 5 Mar 2020 21:55:40 +0530 [thread overview]
Message-ID: <20200305162540.4363-1-lesliemonis@gmail.com> (raw)
Kernel commit 105e808c1da2 ("pie: remove pie_vars->accu_prob_overflows"),
changes the maximum value of tc_pie_xstats->prob from (2^64 - 1) to
(2^56 - 1).
Signed-off-by: Mohit P. Tahiliani <tahiliani@nitk.edu.in>
Signed-off-by: Gautam Ramakrishnan <gautamramk@gmail.com>
Signed-off-by: Leslie Monis <lesliemonis@gmail.com>
---
tc/q_pie.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tc/q_pie.c b/tc/q_pie.c
index 709a78b4..e6939652 100644
--- a/tc/q_pie.c
+++ b/tc/q_pie.c
@@ -223,9 +223,9 @@ 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 */
+ /* prob is returned as a fracion of (2^56 - 1) */
print_float(PRINT_ANY, "prob", " prob %lg",
- (double)st->prob / (double)UINT64_MAX);
+ (double)st->prob / (double)(UINT64_MAX >> 8));
print_uint(PRINT_JSON, "delay", NULL, st->delay);
print_string(PRINT_FP, NULL, " delay %s", sprint_time(st->delay, b1));
--
2.17.1
next reply other threads:[~2020-03-05 16:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-05 16:25 Leslie Monis [this message]
2020-03-09 2:49 ` [PATCH iproute2-next] tc: pie: change maximum integer value of tc_pie_xstats->prob David Ahern
2020-03-09 17:48 ` Eric Dumazet
2020-03-09 17:54 ` Eric Dumazet
2020-03-09 18:42 ` Leslie Monis
2020-03-09 18:53 ` Eric Dumazet
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=20200305162540.4363-1-lesliemonis@gmail.com \
--to=lesliemonis@gmail.com \
--cc=dsahern@gmail.com \
--cc=gautamramk@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=tahiliani@nitk.edu.in \
/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).