netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Doug Ledford <dledford@redhat.com>,
	Ariel Almog <ariela@mellanox.com>,
	Dennis Dalessandro <dennis.dalessandro@intel.com>,
	Linux RDMA <linux-rdma@vger.kernel.org>,
	Linux Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH iproute2 3/5] rdma: Add device capability parsing
Date: Mon, 26 Jun 2017 14:36:10 -0600	[thread overview]
Message-ID: <20170626203610.GB17892@obsidianresearch.com> (raw)
In-Reply-To: <20170626192103.GH1248@mtr-leonro.local>

On Mon, Jun 26, 2017 at 10:21:03PM +0300, Leon Romanovsky wrote:
> On Mon, Jun 26, 2017 at 12:29:24PM -0600, Jason Gunthorpe wrote:
> > On Mon, Jun 26, 2017 at 09:21:26PM +0300, Leon Romanovsky wrote:
> > > From: Leon Romanovsky <leonro@mellanox.com>
> > >
> > > Add parsing interface for the device capability flags
> > >
> > > $ rdma dev show
> > > 1: mlx5_0: caps 0x1257e1c26
> >
> > This seems very un ip-like. I wouldn't show an undecoded hex value
> > like that, it isn't really useful.
> 
> It is first supported field, after new fields will be added, we will
> have very similar to ip interface.
> 
> 1: mlx5_0: caps 0x1257e1c2 key_1 val_1 key_2 val_2 ....
> 
> The value are presented as is can be usable as an input for different scripts.

I still wouldn't show an undecoded hex value.. It isn't useful.

> > > $ rdma dev show mlx5_4 caps
> > > 5: mlx5_4: caps 0x1257e1c26
> > > Bit	Description
> > >  01	DEVICE_BAD_PKEY_CNTR
> > >  02	DEVICE_BAD_QKEY_CNTR
> >
> > This table also seems un ip-like, the usual format is a list of words,
> > I think.
> 
> It is true for key<->value data, but it is less obvious for bit
> parsing.

Several of the word decodes are from bit fields..

> Internally, I tried to present them as list and it was ugly like hell
> without any chance (without extra parsing) to actual see if specific
> capability is present or no.

lspci seems to have no problem being readable while doing this..

Jason

  reply	other threads:[~2017-06-26 20:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-26 18:21 [PATCH iproute2 0/5] RDMAtool Leon Romanovsky
     [not found] ` <20170626182128.24964-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-06-26 18:21   ` [PATCH iproute2 1/5] rdma: Add basic infrastructure for RDMA tool Leon Romanovsky
2017-06-26 18:21   ` [PATCH iproute2 3/5] rdma: Add device capability parsing Leon Romanovsky
     [not found]     ` <20170626182128.24964-4-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-06-26 18:29       ` Jason Gunthorpe
     [not found]         ` <20170626182924.GB16026-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-06-26 19:21           ` Leon Romanovsky
2017-06-26 20:36             ` Jason Gunthorpe [this message]
     [not found]               ` <20170626203610.GB17892-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-06-27  4:06                 ` Leon Romanovsky
     [not found]                   ` <20170627040604.GI1248-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-06-27  9:21                     ` Leon Romanovsky
2017-06-27 16:41                       ` Jason Gunthorpe
     [not found]                         ` <20170627164150.GA4288-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-06-27 17:33                           ` Leon Romanovsky
2017-06-27 17:37                             ` Jason Gunthorpe
     [not found]                               ` <20170627173735.GA5162-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-06-27 17:46                                 ` Leon Romanovsky
     [not found]                                   ` <20170627174615.GV1248-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-06-27 22:18                                     ` Stephen Hemminger
2017-06-28  4:33                                       ` Leon Romanovsky
2017-06-28 16:11                                       ` Jason Gunthorpe
2017-06-28 19:11                                         ` Leon Romanovsky
     [not found]                             ` <20170627173301.GS1248-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-06-27 22:16                               ` Stephen Hemminger
2017-06-26 18:21 ` [PATCH iproute2 2/5] rdma: Add dev object Leon Romanovsky
2017-06-26 18:21 ` [PATCH iproute2 4/5] rdma: Add link option and parsing Leon Romanovsky
2017-06-26 18:21 ` [PATCH iproute2 5/5] rdma: Add initial manual for the tool Leon Romanovsky

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=20170626203610.GB17892@obsidianresearch.com \
    --to=jgunthorpe@obsidianresearch.com \
    --cc=ariela@mellanox.com \
    --cc=dennis.dalessandro@intel.com \
    --cc=dledford@redhat.com \
    --cc=leon@kernel.org \
    --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).