All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-rc] RDMA/core: Fix empty gid table for non IB/RoCE devices
@ 2020-12-06 15:32 Gal Pressman
  2020-12-07 20:36 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Gal Pressman @ 2020-12-06 15:32 UTC (permalink / raw)
  To: Jason Gunthorpe, Doug Ledford
  Cc: linux-rdma, Gal Pressman, Avihai Horon, Leon Romanovsky

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(-)

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++) {

base-commit: b65054597872ce3aefbc6a666385eabdf9e288da
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH for-rc] RDMA/core: Fix empty gid table for non IB/RoCE devices
  2020-12-06 15:32 [PATCH for-rc] RDMA/core: Fix empty gid table for non IB/RoCE devices Gal Pressman
@ 2020-12-07 20:36 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2020-12-07 20:36 UTC (permalink / raw)
  To: Gal Pressman; +Cc: Doug Ledford, linux-rdma, Avihai Horon, Leon Romanovsky

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-07 20:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-06 15:32 [PATCH for-rc] RDMA/core: Fix empty gid table for non IB/RoCE devices Gal Pressman
2020-12-07 20:36 ` Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.