RDMA/irdma: Use the queried port attributes
Subsystems (2)
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.
--- drivers/infiniband/hw/irdma/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/irdma/verbs.c +1 -1
@@ -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
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 attributesInstead of hard code the
gid_table_lenvalue, use the value from theib_query_port()attributes.Fixes b48c24c2d710 ("RDMA/irdma: Implement device supported verbAPIs")
Signed-off-by Kamal Heib <[email protected]>--- drivers/infiniband/hw/irdma/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/infiniband/hw/irdma/verbs.c +1
-1@@ -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
Quoted 9 lines · Kamal Heib
Instead of hard code the
gid_table_lenvalue, use the value from theib_query_port()attributes.Fixes b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")Signed-off-by Kamal Heib <[email protected]>Acked-by Tatyana Nikolova <[email protected]>--- drivers/infiniband/hw/irdma/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to for-next, thanks
Jason