RDMA/efa: Add support for node guid
Subsystems (2)
Michael Margolin
maintainerPATCH 1/1 RDMA/efa: Add support for node guid
From: Yehuda Yitschak <[email protected]>
Propagate the unique, per device, ID in the device attributes to the standard node_guid value in IB device.
Reviewed-by Yonatan Nachum <[email protected]>
Signed-off-by Yehuda Yitschak <[email protected]>
Signed-off-by Michael Margolin <[email protected]>
--- drivers/infiniband/hw/efa/efa_admin_cmds_defs.h | 3 +++ drivers/infiniband/hw/efa/efa_com_cmd.c | 1 + drivers/infiniband/hw/efa/efa_com_cmd.h | 1 + drivers/infiniband/hw/efa/efa_main.c | 1 + 4 files changed, 6 insertions(+)
drivers/infiniband/hw/efa/efa_admin_cmds_defs.h +3 -0
@@ -674,6 +674,9 @@ struct efa_admin_feature_device_attr_desc {/* Max RDMA transfer size in bytes */ u32 max_rdma_size; + +/* Unique global ID for an EFA device */ +u64 guid; };struct efa_admin_feature_queue_attr_desc {
drivers/infiniband/hw/efa/efa_com_cmd.c +1 -0
@@ -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->max_rdma_size = resp.u.device_attr.max_rdma_size; result->device_caps = resp.u.device_attr.device_caps; + result->guid = resp.u.device_attr.guid;if (result->admin_api_version <1 ) { ibdev_err_ratelimited(
drivers/infiniband/hw/efa/efa_com_cmd.h +1 -0
@@ -112,6 +112,7 @@ struct efa_com_get_device_attr_result {u8 addr[EFA_GID_SIZE ];u64 page_size_cap;u64 max_mr_pages; +u64 guid;u32 mtu;u32 fw_version;u32 admin_api_version;
drivers/infiniband/hw/efa/efa_main.c +1 -0
@@ -441,6 +441,7 @@ static int efa_ib_device_add(struct efa_dev *dev)efa_set_host_info (dev); dev->ibdev.node_type =RDMA_NODE_UNSPECIFIED ; + dev->ibdev.node_guid = dev->dev_attr.guid; dev->ibdev.phys_port_cnt =1 ; dev->ibdev.num_comp_vectors = dev->neqs ?:1 ; dev->ibdev.dev.parent = &pdev->dev;
Signature · 1 line
2.40.1
Quoted 8 lines · Michael Margolin
From: Yehuda Yitschak <[email protected]>
Propagate the unique, per device, ID in the device attributes to the standard
node_guidvalue in IB device.Reviewed-by Yonatan Nachum <[email protected]>Signed-off-by Yehuda Yitschak <[email protected]>Signed-off-by Michael Margolin <[email protected]>
Quoted 6 lines
--- drivers/infiniband/hw/efa/efa_admin_cmds_defs.h | 3 +++ drivers/infiniband/hw/efa/efa_com_cmd.c | 1 + drivers/infiniband/hw/efa/efa_com_cmd.h | 1 + drivers/infiniband/hw/efa/efa_main.c | 1 + 4 files changed, 6 insertions(+)
Applied to for-next, thanks
Jason