Re: [PATCH iproute2 v3 1/2] tc: u32: add support for json output
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2022-01-24 18:51:24
On Mon, 24 Jan 2022 19:25:06 +0100 Andrea Claudi [off-list ref] wrote:
On Thu, Jan 06, 2022 at 02:30:13PM -0800, Stephen Hemminger wrote:quoted
On Thu, 6 Jan 2022 13:45:51 -0500 Wen Liang [off-list ref] wrote:quoted
} 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 caseHi 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.