Re: New GID query API broke EFA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux