From: Stephen Hemminger <stephen@networkplumber.org>
To: Jamie Gloudon <jamie.gloudon@gmx.fr>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] tc/m_estimator: Print proper value for estimator interval in raw.
Date: Sun, 19 Jul 2020 10:07:56 -0700 [thread overview]
Message-ID: <20200719100756.5895a292@hermes.lan> (raw)
In-Reply-To: <20200717150530.GA2987@defense.gouv.fr>
On Fri, 17 Jul 2020 11:05:30 -0400
Jamie Gloudon <jamie.gloudon@gmx.fr> wrote:
> While looking at the estimator code, I noticed an incorrect interval
> number printed in raw for the handles. This patch fixes the formatting.
>
> Before patch:
>
> root@bytecenter.fr:~# tc -r filter add dev eth0 ingress estimator
> 250ms 999ms matchall action police avrate 12mbit conform-exceed drop
> [estimator i=4294967294 e=2]
>
> After patch:
>
> root@bytecenter.fr:~# tc -r filter add dev eth0 ingress estimator
> 250ms 999ms matchall action police avrate 12mbit conform-exceed drop
> [estimator i=-2 e=2]
>
> Signed-off-by: Jamie Gloudon <jamie.gloudon@gmx.fr>
> ---
> tc/m_estimator.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tc/m_estimator.c b/tc/m_estimator.c
> index ef62e1bb..b5f4c860 100644
> --- a/tc/m_estimator.c
> +++ b/tc/m_estimator.c
> @@ -57,7 +57,7 @@ int parse_estimator(int *p_argc, char ***p_argv, struct tc_estimator *est)
> return -1;
> }
> if (show_raw)
> - fprintf(stderr, "[estimator i=%u e=%u]\n", est->interval, est->ewma_log);
> + fprintf(stderr, "[estimator i=%hhd e=%u]\n", est->interval, est->ewma_log);
> *p_argc = argc;
> *p_argv = argv;
> return 0;
> --
> 2.17.5
>
Looks ok to me. Could you update estimator to print JSON as well?
prev parent reply other threads:[~2020-07-19 17:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 15:05 [PATCH iproute2] tc/m_estimator: Print proper value for estimator interval in raw Jamie Gloudon
2020-07-19 17:07 ` Stephen Hemminger [this message]
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=20200719100756.5895a292@hermes.lan \
--to=stephen@networkplumber.org \
--cc=jamie.gloudon@gmx.fr \
--cc=netdev@vger.kernel.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).