Subject: Re: [PATCH iproute2 v3 1/2] tc: u32: add support for json output

From: Stephen Hemminger <[email-masked]>
Date: Mon, 24 Jan 2022 10:50:16 -0800

On Mon, 24 Jan 2022 19:25:06 +0100
Andrea Claudi <[email-masked]> 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 <[email-masked]> 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.