From: Andrea Claudi <aclaudi@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org, Wen Liang <wenliang@redhat.com>,
David Ahern <dsahern@kernel.org>
Subject: Re: [PATCH iproute2 v3 1/2] tc: u32: add support for json output
Date: Mon, 24 Jan 2022 22:30:21 +0100 [thread overview]
Message-ID: <Ye8abWbX5TZngvIS@tc2> (raw)
In-Reply-To: <20220124105016.66e3558c@hermes.local>
On Mon, Jan 24, 2022 at 10:50:16AM -0800, Stephen Hemminger wrote:
> On Mon, 24 Jan 2022 19:25:06 +0100
> Andrea Claudi <aclaudi@redhat.com> wrote:
>
> > On Thu, Jan 06, 2022 at 02:30:13PM -0800, Stephen Hemminger wrote:
> > > On Thu, 6 Jan 2022 13:45:51 -0500
> > > Wen Liang <liangwen12year@gmail.com> wrote:
> > >
> > > > } else if (sel && sel->flags & TC_U32_TERMINAL) {
> > > > - fprintf(f, "terminal flowid ??? ");
> > > > + print_bool(PRINT_ANY, "terminal_flowid", "terminal flowid ??? ", true);
> > >
> > > This looks like another error (ie to stderr) like the earlier case
> > >
> >
> > Hi Stephen,
> > Sorry for coming to this so late, but this doesn't look like an error to me.
> >
> > As far as I can see, TC_U32_TERMINAL is set in this file together with
> > CLASSID or when "action" or "policy" are used. The latter case should be
> > the one that this else branch should catch.
> >
> > Now, "terminal flowid ???" looks to me like a message printed when we
> > don't actually have a flowid to show, and indeed that is specified when
> > this flag is set (see the comment at line 1169). As such this is
> > probably more a useless log message, than an error one.
> >
> > If this is the case, we can probably maintain this message on the
> > PRINT_FP output (only to not break script parsing this bit of info out
> > there), and disregard this bit of info on the JSON output.
> >
> > What do you think?
> >
> > Regards,
> > Andrea
> >
>
> Just always put the same original message on stderr.
>
Let me phrase my case better: I think the "terminal flowid" message
should not be on stderr, as I don't think this is an error message.
Indeed, "terminal flowid ???" is printed every time we use "action" or
"policy" (see my previous email for details), even when no error is
present and cls_u32 is working ok. In these cases, not having a flowid
is legitimate and not an error.
As this is the case, I think the proper course of action is to have this
message printed out only in non-json output to preserve the same output
of older iproute versions. It would be even better if we decide to
remove this message altogether, as it is not adding any valuable info to
the user.
next prev parent reply other threads:[~2022-01-24 21:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-06 18:45 [PATCH iproute2 v3 0/2] add json support on tc u32 Wen Liang
2022-01-06 18:45 ` [PATCH iproute2 v3 1/2] tc: u32: add support for json output Wen Liang
2022-01-06 22:30 ` Stephen Hemminger
2022-01-07 16:54 ` David Ahern
2022-01-24 18:25 ` Andrea Claudi
2022-01-24 18:50 ` Stephen Hemminger
2022-01-24 21:30 ` Andrea Claudi [this message]
2022-01-25 0:43 ` Stephen Hemminger
2022-01-26 13:52 ` Jamal Hadi Salim
2022-01-26 15:50 ` David Ahern
2022-01-31 12:54 ` Jamal Hadi Salim
2022-01-31 15:50 ` David Ahern
2022-01-31 19:37 ` Jamal Hadi Salim
2022-01-06 18:45 ` [PATCH iproute2 v3 2/2] tc: u32: add json support in `print_raw`, `print_ipv4`, `print_ipv6` Wen Liang
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=Ye8abWbX5TZngvIS@tc2 \
--to=aclaudi@redhat.com \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=wenliang@redhat.com \
/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).