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: b48c24c2d7
("RDMA/irdma: Implement device supported verb APIs")
Link: https://lore.kernel.org/r/20210620201503.67055-1-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Acked-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
Родитель
2d3b2e4427
Коммит
feda49a1a5
|
@ -3633,7 +3633,7 @@ static int irdma_iw_port_immutable(struct ib_device *ibdev, u32 port_num,
|
||||||
err = ib_query_port(ibdev, port_num, &attr);
|
err = ib_query_port(ibdev, port_num, &attr);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
immutable->gid_tbl_len = 1;
|
immutable->gid_tbl_len = attr.gid_tbl_len;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче