Skip to contentSkip to conversation

RDMA/irdma: Use the queried port attributes

PATCH Applied Kamal Heib 3 participants 3 messages Jun 20, 2021 – Jun 23, 2021

Subsystems (2)
lore
Share & tools
lore

Kamal Heib

author
#0 lore raw

PATCH 1/1 RDMA/irdma: Use the queried port attributes

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")
---
 drivers/infiniband/hw/irdma/verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/irdma/verbs.c +1 -1
index e8b170f0d997..5ae5dbcbc3a5 100644
@@ -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;
 }
Signature · 1 line
2.31.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 35 lines

-----Original Message-----
From: Kamal Heib <[email protected]>
Sent: Sunday, June 20, 2021 3:15 PM
To: [email protected]
Cc: Ismail, Mustafa <[email protected]>; Saleem, Shiraz <[email protected]>; Doug Ledford <[email protected]>; Jason Gunthorpe <[email protected]>; Kamal Heib <[email protected]>
Subject: [PATCH for-next] RDMA/irdma: Use the queried port attributes

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

---
 drivers/infiniband/hw/irdma/verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/irdma/verbs.c +1 -1
index e8b170f0d997..5ae5dbcbc3a5 100644
@@ -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;
Quoted 3 lines

}
--
2.31.1

maintainer Applied
#2 lore raw
In reply to Kamal Heib
Quoted 9 lines · 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")
---
 drivers/infiniband/hw/irdma/verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Jason