Skip to contentSkip to conversation

RDMA/core: Fix empty gid table for non IB/RoCE devices

PATCH Applied Gal Pressman 2 participants 2 messages Dec 6, 2020 – Dec 7, 2020 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/core: Fix empty gid table for non IB/RoCE devices

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 c4b4d548fabc ("RDMA/core: Introduce new GID table query API")
---
 drivers/infiniband/core/cache.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/infiniband/core/cache.c +0 -3
index 8017c40dd110..7989b7e1d1c0 100644
@@ -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++) {

base-commit: b65054597872ce3aefbc6a666385eabdf9e288da

Signature · 1 line
2.29.2
maintainer Applied
#1 lore raw
Quoted 9 lines · Gal Pressman

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 c4b4d548fabc ("RDMA/core: Introduce new GID table query API")
---
 drivers/infiniband/core/cache.c | 3 ---
 1 file changed, 3 deletions(-)

Applied to for-rc, thanks

JAson