Skip to content

Commit

Permalink
RDMA/uverbs: Fix false error in query gid IOCTL
Browse files Browse the repository at this point in the history
Some drivers (such as EFA) have a GID table, but aren't IB/RoCE devices.
Remove the unnecessary rdma_ib_or_roce() check.

This fixes rdma-core failures for EFA when it uses the new ioctl interface
for querying the GID table.

Fixes: 9f85cbe ("RDMA/uverbs: Expose the new GID query API to user space")
Link: https://lore.kernel.org/r/20201026082621.32463-1-galpress@amazon.com
Signed-off-by: Gal Pressman <galpress@amazon.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
  • Loading branch information
gal-pressman authored and jgunthorpe committed Oct 26, 2020
1 parent fbdd004 commit 7d66a71
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/infiniband/core/uverbs_std_types_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,6 @@ static int UVERBS_HANDLER(UVERBS_METHOD_QUERY_GID_ENTRY)(
if (!rdma_is_port_valid(ib_dev, port_num))
return -EINVAL;

if (!rdma_ib_or_roce(ib_dev, port_num))
return -EOPNOTSUPP;

gid_attr = rdma_get_gid_attr(ib_dev, port_num, gid_index);
if (IS_ERR(gid_attr))
return PTR_ERR(gid_attr);
Expand Down

0 comments on commit 7d66a71

Please sign in to comment.