All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leonro@nvidia.com>
Cc: Gal Pressman <galpress@amazon.com>,
	Avihai Horon <avihaih@nvidia.com>,
	Maor Gottlieb <maorg@nvidia.com>, <linux-rdma@vger.kernel.org>,
	"Leybovich, Yossi" <sleybo@amazon.com>
Subject: Re: New GID query API broke EFA
Date: Thu, 22 Oct 2020 13:37:44 -0300	[thread overview]
Message-ID: <20201022163744.GY6219@nvidia.com> (raw)
In-Reply-To: <20201022122301.GF2611066@unreal>

On Thu, Oct 22, 2020 at 03:23:01PM +0300, Leon Romanovsky wrote:
> On Thu, Oct 22, 2020 at 09:10:35AM -0300, Jason Gunthorpe wrote:
> > On Thu, Oct 22, 2020 at 02:21:00PM +0300, Leon Romanovsky wrote:
> > > On Thu, Oct 22, 2020 at 01:58:29PM +0300, Gal Pressman wrote:
> > > > Hi all,
> > > >
> > > > The new IOCTL query GID API 9f85cbe50aa0 ("RDMA/uverbs: Expose the new GID query
> > > > API to user space") currently breaks EFA, as ibv_query_gid() no longer works.
> > > >
> > > > The problem is that the IOCTL call checks for:
> > > > 	if (!rdma_ib_or_roce(ib_dev, port_num))
> > > > 		return -EOPNOTSUPP;
> > > >
> > > > EFA is neither of these, but it uses GIDs.
> > > >
> > > > Any objections to remove the check? Any other solutions come to mind?
> > >
> > > We added this check to protect access to rdma_get_gid_attr() for devices
> > > without GID table.
> > >  1234         table = rdma_gid_table(device, port_num);
> > >  1235         if (index < 0 || index >= table->sz)
> > >  1236                 return ERR_PTR(-EINVAL);
> > >
> > > So you can extend that function to return for table == NULL an error and
> > > remove rdma_ib_or_roce()
> >
> > How does table == NULL ever?
> 
> ok, you are right in that regards.
> However, mlx5 IB representors don't support GIDs and sets gid_tbl_len to be zero.
> Do we want to rely on the assumption that table will always exist?

We do already, seems like the rdma_ib_or_roce should just be deleted

Jason

      reply	other threads:[~2020-10-22 16:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22 10:58 New GID query API broke EFA Gal Pressman
2020-10-22 11:21 ` Leon Romanovsky
2020-10-22 11:49   ` Gal Pressman
2020-10-22 12:10   ` Jason Gunthorpe
2020-10-22 12:12     ` Gal Pressman
2020-10-22 12:15       ` Gal Pressman
2020-10-22 12:23         ` Leon Romanovsky
2020-10-22 12:23     ` Leon Romanovsky
2020-10-22 16:37       ` Jason Gunthorpe [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=20201022163744.GY6219@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=avihaih@nvidia.com \
    --cc=galpress@amazon.com \
    --cc=leonro@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=maorg@nvidia.com \
    --cc=sleybo@amazon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.