mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-07-05 13:25:20 +02:00
RDMA/efa: Add support for node guid
Propagate the unique, per device, ID in the device attributes to the standard node_guid value in IB device. Link: https://patch.msgid.link/r/20240822171143.2800-1-mrgolin@amazon.com Reviewed-by: Yonatan Nachum <ynachum@amazon.com> Signed-off-by: Yehuda Yitschak <yehuday@amazon.com> Signed-off-by: Michael Margolin <mrgolin@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
86dfdd8288
commit
04e36fd27a
|
@ -674,6 +674,9 @@ struct efa_admin_feature_device_attr_desc {
|
||||||
|
|
||||||
/* Max RDMA transfer size in bytes */
|
/* Max RDMA transfer size in bytes */
|
||||||
u32 max_rdma_size;
|
u32 max_rdma_size;
|
||||||
|
|
||||||
|
/* Unique global ID for an EFA device */
|
||||||
|
u64 guid;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct efa_admin_feature_queue_attr_desc {
|
struct efa_admin_feature_queue_attr_desc {
|
||||||
|
|
|
@ -465,6 +465,7 @@ int efa_com_get_device_attr(struct efa_com_dev *edev,
|
||||||
result->db_bar = resp.u.device_attr.db_bar;
|
result->db_bar = resp.u.device_attr.db_bar;
|
||||||
result->max_rdma_size = resp.u.device_attr.max_rdma_size;
|
result->max_rdma_size = resp.u.device_attr.max_rdma_size;
|
||||||
result->device_caps = resp.u.device_attr.device_caps;
|
result->device_caps = resp.u.device_attr.device_caps;
|
||||||
|
result->guid = resp.u.device_attr.guid;
|
||||||
|
|
||||||
if (result->admin_api_version < 1) {
|
if (result->admin_api_version < 1) {
|
||||||
ibdev_err_ratelimited(
|
ibdev_err_ratelimited(
|
||||||
|
|
|
@ -112,6 +112,7 @@ struct efa_com_get_device_attr_result {
|
||||||
u8 addr[EFA_GID_SIZE];
|
u8 addr[EFA_GID_SIZE];
|
||||||
u64 page_size_cap;
|
u64 page_size_cap;
|
||||||
u64 max_mr_pages;
|
u64 max_mr_pages;
|
||||||
|
u64 guid;
|
||||||
u32 mtu;
|
u32 mtu;
|
||||||
u32 fw_version;
|
u32 fw_version;
|
||||||
u32 admin_api_version;
|
u32 admin_api_version;
|
||||||
|
|
|
@ -441,6 +441,7 @@ static int efa_ib_device_add(struct efa_dev *dev)
|
||||||
efa_set_host_info(dev);
|
efa_set_host_info(dev);
|
||||||
|
|
||||||
dev->ibdev.node_type = RDMA_NODE_UNSPECIFIED;
|
dev->ibdev.node_type = RDMA_NODE_UNSPECIFIED;
|
||||||
|
dev->ibdev.node_guid = dev->dev_attr.guid;
|
||||||
dev->ibdev.phys_port_cnt = 1;
|
dev->ibdev.phys_port_cnt = 1;
|
||||||
dev->ibdev.num_comp_vectors = dev->neqs ?: 1;
|
dev->ibdev.num_comp_vectors = dev->neqs ?: 1;
|
||||||
dev->ibdev.dev.parent = &pdev->dev;
|
dev->ibdev.dev.parent = &pdev->dev;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user