On Tue, 15 Dec 2020 09:42:08 +0200 Maxim Mikityanskiy <maxi...@mellanox.com> wrote:
> + print_uint(PRINT_ANY, "offload", " offload %d", !!tb[TCA_HTB_OFFLOAD]); This is not the best way to represent a boolean flag in JSON. Also it breaks the "output should be the same as command line" mantra. My preference is json_null to indicate presence of a flag. Something like: if (tb[TCA_HTB_OFFLOAD]) print_null(PRINT_ANY, "offload", "offload", NULL);