public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-next] RDMA/irdma: Use the queried port attributes
@ 2021-06-20 20:15 Kamal Heib
  2021-06-22 23:17 ` Nikolova, Tatyana E
  2021-06-23  0:02 ` Jason Gunthorpe
  0 siblings, 2 replies; 3+ messages in thread
From: Kamal Heib @ 2021-06-20 20:15 UTC (permalink / raw)
  To: linux-rdma
  Cc: Mustafa Ismail, Shiraz Saleem, Doug Ledford, Jason Gunthorpe,
	Kamal Heib

Instead of hard code the gid_table_len value, use the value from the
ib_query_port() attributes.

Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
---
 drivers/infiniband/hw/irdma/verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
index e8b170f0d997..5ae5dbcbc3a5 100644
--- a/drivers/infiniband/hw/irdma/verbs.c
+++ b/drivers/infiniband/hw/irdma/verbs.c
@@ -3627,7 +3627,7 @@ static int irdma_iw_port_immutable(struct ib_device *ibdev, u32 port_num,
 	err = ib_query_port(ibdev, port_num, &attr);
 	if (err)
 		return err;
-	immutable->gid_tbl_len = 1;
+	immutable->gid_tbl_len = attr.gid_tbl_len;
 
 	return 0;
 }
-- 
2.31.1


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

end of thread, other threads:[~2021-06-23  0:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-20 20:15 [PATCH for-next] RDMA/irdma: Use the queried port attributes Kamal Heib
2021-06-22 23:17 ` Nikolova, Tatyana E
2021-06-23  0:02 ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox