linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Dennis Dalessandro <dennis.dalessandro@intel.com>
Cc: Jens Domke <jens.domke@riken.jp>,
	Haim Boozaglo <haimbo@mellanox.com>,
	linux-rdma@vger.kernel.org
Subject: Re: "ibstat -l" displays CA device list in an unsorted order
Date: Wed, 26 Feb 2020 15:56:11 +0200	[thread overview]
Message-ID: <20200226135611.GD12414@unreal> (raw)
In-Reply-To: <dbb87a79-2edb-b19b-7408-267db7587a5c@intel.com>

On Wed, Feb 26, 2020 at 08:42:57AM -0500, Dennis Dalessandro wrote:
> On 2/25/2020 2:43 PM, Leon Romanovsky wrote:
> > > I (and highly likely many other admins out there who don't follow this
> > > list) am in full support of Haim's request for sorted output.
> >
> > I don't see any API or utils in the rdma-core which promised to provide
> > sorted output.
>
> That is true, but when sys admins count on things in a certain way and the
> rug gets pulled out from under them that's a headache at best.

I'm not arguing about that and really understand, just don't want people
to develop cargo cult around internal implementation of some tool.

>
> > >
> > > Not everything can/will be pinned down in a manpage, but if you insist
> > > then sure someone can submit a amendment to the ibstat documentation
> > > which demands alphanumeric sorting for the NICs/ports.
> >
> > The manual is not enough, what about other tools? Should we update them
> > too? Or do we need to make ibstat special while rest of the tools keep
> > the list unsorted?
> >
> > Maybe I'm part of the problem, but any solution will require unified
> > approach for whole rdma-core, so users like you will get stable and
> > consistent result from any rdma-core API/tool.
>
> So am I understanding this right, the crux of the problem is the code
> switched from using scandir() via libibumad to readdir(). The later of which
> does not keep the same sorted order?
>
> Maybe let's look at why the change was done in the first place rather than
> arguing over which way it should be. Is there a good reason to go with
> readdir() approach if so then maybe that out weights the inconvenience of
> not getting a sorted list. Or maybe it doesn't.

I sure that Jason will remember more details, but from my point of view,
everything started when we allowed to extend ibstat to look on sysfs
instead of implementing netlink discovery, which will change order
again.

Thanks

>
> -Denny

      reply	other threads:[~2020-02-26 13:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24 18:06 "ibstat -l" displays CA device list in an unsorted order Haim Boozaglo
2020-02-24 19:41 ` Jason Gunthorpe
2020-02-25  8:25   ` Haim Boozaglo
2020-02-26 13:43     ` Jason Gunthorpe
2020-02-26 13:57       ` Leon Romanovsky
2020-02-26 17:09         ` Jason Gunthorpe
2020-02-27  7:48           ` Haim Boozaglo
2020-02-27 12:49             ` Leon Romanovsky
2020-02-27 12:57               ` Vladimir Koushnir
2020-02-27 13:59                 ` Leon Romanovsky
2020-02-27 13:33             ` Jason Gunthorpe
2020-02-27 14:55               ` Dennis Dalessandro
2020-02-27 15:26                 ` Jason Gunthorpe
2020-02-25  7:48 ` Leon Romanovsky
2020-02-25  8:36   ` Haim Boozaglo
2020-02-25  9:18     ` Leon Romanovsky
2020-02-25 17:18       ` Jens Domke
2020-02-25 19:43         ` Leon Romanovsky
2020-02-26 13:42           ` Dennis Dalessandro
2020-02-26 13:56             ` Leon Romanovsky [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=20200226135611.GD12414@unreal \
    --to=leon@kernel.org \
    --cc=dennis.dalessandro@intel.com \
    --cc=haimbo@mellanox.com \
    --cc=jens.domke@riken.jp \
    --cc=linux-rdma@vger.kernel.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).