From: David Ahern <dsahern@gmail.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Ido Kalir <idok@mellanox.com>, netdev <netdev@vger.kernel.org>,
RDMA mailing list <linux-rdma@vger.kernel.org>,
Stephen Hemminger <stephen@networkplumber.org>,
Leon Romanovsky <leonro@mellanox.com>
Subject: Re: [PATCH iproute2-next] rdma: Rewrite custom JSON and prints logic to use common API
Date: Tue, 19 Nov 2019 19:33:13 -0700 [thread overview]
Message-ID: <afe19f2b-a2dc-f1ad-9186-0505d7ea61ca@gmail.com> (raw)
In-Reply-To: <20191118083530.51788-1-leon@kernel.org>
On 11/18/19 1:35 AM, Leon Romanovsky wrote:
> From: Ido Kalir <idok@mellanox.com>
>
> Instead of doing open-coded solution to generate JSON and prints, let's
> reuse existing infrastructure and APIs to do the same as ip/*.
>
> Before this change:
> if (rd->json_output)
> jsonw_uint_field(rd->jw, "sm_lid", sm_lid);
> else
> pr_out("sm_lid %u ", sm_lid);
>
> After this change:
> print_uint(PRINT_ANY, "sm_lid", "sm_lid %u ", sm_lid);
>
> All the print functions are converted to support color but for now the
> type of color is COLOR_NONE. This is done as a preparation to addition
> of color enable option. Such change will require rewrite of command line
> arguments parser which is out-of-scope for this patch.
>
> Signed-off-by: Ido Kalir <idok@mellanox.com>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Applied to iproute2-next. Thank you for doing this!
Now we just devlink to be converted.
prev parent reply other threads:[~2019-11-20 2:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-18 8:35 [PATCH iproute2-next] rdma: Rewrite custom JSON and prints logic to use common API Leon Romanovsky
2019-11-20 2:33 ` David Ahern [this message]
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=afe19f2b-a2dc-f1ad-9186-0505d7ea61ca@gmail.com \
--to=dsahern@gmail.com \
--cc=idok@mellanox.com \
--cc=leon@kernel.org \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/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).