diff mbox series

[for-rc] RDMA/core: Fix empty gid table for non IB/RoCE devices

Message ID 20201206153238.34878-1-galpress@amazon.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series [for-rc] RDMA/core: Fix empty gid table for non IB/RoCE devices | expand

Commit Message

Gal Pressman Dec. 6, 2020, 3:32 p.m. UTC
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")
Signed-off-by: Gal Pressman <galpress@amazon.com>
---
 drivers/infiniband/core/cache.c | 3 ---
 1 file changed, 3 deletions(-)


base-commit: b65054597872ce3aefbc6a666385eabdf9e288da

Comments

Jason Gunthorpe Dec. 7, 2020, 8:36 p.m. UTC | #1
On Sun, Dec 06, 2020 at 05:32:38PM +0200, Gal Pressman wrote:
> 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")
> Signed-off-by: Gal Pressman <galpress@amazon.com>
> ---
>  drivers/infiniband/core/cache.c | 3 ---
>  1 file changed, 3 deletions(-)

Applied to for-rc, thanks

JAson
diff mbox series

Patch

diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c
index 8017c40dd110..7989b7e1d1c0 100644
--- a/drivers/infiniband/core/cache.c
+++ b/drivers/infiniband/core/cache.c
@@ -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++) {