Skip to content

Commit

Permalink
RDMA/core: Fix empty gid table for non IB/RoCE devices
Browse files Browse the repository at this point in the history
The query_gid_table ioctl skips non IB/RoCE ports, which as a result
returns an empty gid table for devices such as EFA which have a GID table,
but are not IB/RoCE.

Fixes: c4b4d54 ("RDMA/core: Introduce new GID table query API")
Link: https://lore.kernel.org/r/20201206153238.34878-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 Dec 7, 2020
1 parent 93416ab commit e432c04
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/infiniband/core/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1269,9 +1269,6 @@ ssize_t rdma_query_gid_table(struct ib_device *device,
unsigned long flags;

rdma_for_each_port(device, port_num) {
if (!rdma_ib_or_roce(device, port_num))
continue;

table = rdma_gid_table(device, port_num);
read_lock_irqsave(&table->rwlock, flags);
for (i = 0; i < table->sz; i++) {
Expand Down

0 comments on commit e432c04

Please sign in to comment.