From: Jakub Kicinski <kuba@kernel.org>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: "Mogilappagari, Sudheer" <sudheer.mogilappagari@intel.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"mkubecek@suse.cz" <mkubecek@suse.cz>,
"andrew@lunn.ch" <andrew@lunn.ch>,
"corbet@lwn.net" <corbet@lwn.net>,
"Samudrala, Sridhar" <sridhar.samudrala@intel.com>,
"Nguyen, Anthony L" <anthony.l.nguyen@intel.com>,
stephen@networkplumber.org
Subject: Re: [PATCH ethtool-next v2 2/2] netlink: add netlink handler for get rss (-x)
Date: Fri, 23 Dec 2022 11:50:49 -0800 [thread overview]
Message-ID: <20221223115049.12b985b1@kernel.org> (raw)
In-Reply-To: <Y6WMIANorlX8lMfN@electric-eye.fr.zoreil.com>
On Fri, 23 Dec 2022 12:08:16 +0100 Francois Romieu wrote:
> > Hex would be great, but AFAIR JSON does not support hex :(
> > Imagine dealing with this in python, or bash. Do you really
> > want the values to be strings? They will have to get converted
> > manually to integers. So I think just making them integers is
> > best, JSON is for machines not for looking at...
>
> 'ip' json output does not use the suggested format.
>
> It may be interesting to know if the experience proved it to be
> a poor choice.
Hopefully without sounding impolite let me clarify that it is precisely
*experience* using the JSON output of ip extensively in Python and Ruby
(chef) which leads me to make the suggestion.
I made the same mistake in bpftool's JSON output, formatting binary
data as hex strings so it "looks nice" :(
Unfortunately we consider JSON output to be uAPI-like so we can't
change the format now :(
next prev parent reply other threads:[~2022-12-23 19:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-22 0:13 [PATCH ethtool-next v2 0/2] add netlink support for rss get Sudheer Mogilappagari
2022-12-22 0:13 ` [PATCH ethtool-next v2 1/2] Move code that print rss info into common file Sudheer Mogilappagari
2022-12-22 0:13 ` [PATCH ethtool-next v2 2/2] netlink: add netlink handler for get rss (-x) Sudheer Mogilappagari
2022-12-22 1:22 ` Jakub Kicinski
2022-12-22 22:57 ` Mogilappagari, Sudheer
2022-12-23 2:02 ` Jakub Kicinski
2022-12-23 11:08 ` Francois Romieu
2022-12-23 19:50 ` Jakub Kicinski [this message]
2022-12-25 18:07 ` Francois Romieu
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=20221223115049.12b985b1@kernel.org \
--to=kuba@kernel.org \
--cc=andrew@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=corbet@lwn.net \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.com \
--cc=sridhar.samudrala@intel.com \
--cc=stephen@networkplumber.org \
--cc=sudheer.mogilappagari@intel.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).