misc: mic: SCIF messaging and node enumeration APIs
SCIF messaging APIs which allow sending messages between the SCIF endpoints via a byte stream based ring buffer which has been optimized to avoid reads across PCIe. The SCIF messaging APIs are typically used for short < 1024 byte messages for best performance while the RDMA APIs which will be submitted in a future patch series is recommended for larger transfers. The node enumeration API enables a user to query for the number of nodes online in the SCIF network and their node ids. Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
76371c7c0d
commit
fdd9fd5c38
@@ -218,3 +218,20 @@ void scif_disconnect_node(u32 node_id, bool mgmt_initiated)
|
||||
(atomic_read(&scifdev->disconn_rescnt) == 1),
|
||||
SCIF_NODE_ALIVE_TIMEOUT);
|
||||
}
|
||||
|
||||
void scif_get_node_info(void)
|
||||
{
|
||||
struct scifmsg msg;
|
||||
DECLARE_COMPLETION_ONSTACK(node_info);
|
||||
|
||||
msg.uop = SCIF_GET_NODE_INFO;
|
||||
msg.src.node = scif_info.nodeid;
|
||||
msg.dst.node = SCIF_MGMT_NODE;
|
||||
msg.payload[3] = (u64)&node_info;
|
||||
|
||||
if ((scif_nodeqp_send(&scif_dev[SCIF_MGMT_NODE], &msg)))
|
||||
return;
|
||||
|
||||
/* Wait for a response with SCIF_GET_NODE_INFO */
|
||||
wait_for_completion(&node_info);
|
||||
}
|
||||
|
Reference in New Issue
Block a user