提交 feda49a1 编写于 作者: K Kamal Heib 提交者: Jason Gunthorpe

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: b48c24c2 ("RDMA/irdma: Implement device supported verb APIs")
Link: https://lore.kernel.org/r/20210620201503.67055-1-kamalheib1@gmail.comSigned-off-by: NKamal Heib <kamalheib1@gmail.com>
Acked-by: NTatyana Nikolova <tatyana.e.nikolova@intel.com>
Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
上级 2d3b2e44
......@@ -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);
if (err)
return err;
immutable->gid_tbl_len = 1;
immutable->gid_tbl_len = attr.gid_tbl_len;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册