[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201215142653.2a16e888@hermes.local>
Date: Tue, 15 Dec 2020 14:26:53 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: Maxim Mikityanskiy <maximmi@...lanox.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>, David Ahern <dsahern@...il.com>,
Saeed Mahameed <saeedm@...dia.com>,
Jakub Kicinski <kuba@...nel.org>,
Tariq Toukan <tariqt@...dia.com>,
Yossi Kuperman <yossiku@...dia.com>,
Maxim Mikityanskiy <maximmi@...dia.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH iproute2-next] tc/htb: Hierarchical QoS hardware offload
On Tue, 15 Dec 2020 09:42:08 +0200
Maxim Mikityanskiy <maximmi@...lanox.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);
Powered by blists - more mailing lists