History

RDMA/ucma: Support write an event into a CM

Enable user-space to inject an event into a CM through it's event channel. Two new events are added and supported: RDMA_CM_EVENT_USER and RDMA_CM_EVENT_INTERNAL. With these 2 events a new event parameter "arg" is supported, which is passed from sender to receiver transparently. With this feature an application is able to write an event into a CM channel with a new user-space rdmacm API. For example thread T1 could write an event with the API: rdma_write_cm_event(cm_id, RDMA_CM_EVENT_USER, status, arg); and thread T2 could receive the event with rdma_get_cm_event().

Mark Zhang committed 1 year ago

Commit a3c9d0f1 parent 810f8743 files · +70 −3Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/rdma/rdma_user_cm.h+15−1
@@ -68,7 +68,8 @@ enum { · 67 unmodified lines
6868 RDMA_USER_CM_CMD_BIND,
6969 RDMA_USER_CM_CMD_RESOLVE_ADDR,
7070 RDMA_USER_CM_CMD_JOIN_MCAST,
71− RDMA_USER_CM_CMD_RESOLVE_IB_SERVICE
71+ RDMA_USER_CM_CMD_RESOLVE_IB_SERVICE,
72+ RDMA_USER_CM_CMD_WRITE_CM_EVENT,
7273 };
7374
7475 /* See IBTA Annex A11, servies ID bytes 4 & 5 */
@@ -304,6 +305,7 @@ struct rdma_ucm_event_resp { · 229 unmodified lines
304305 union {
305306 struct rdma_ucm_conn_param conn;
306307 struct rdma_ucm_ud_param ud;
308+ __u32 arg32[2];
307309 } param;
308310 __u32 reserved;
309311 struct rdma_ucm_ece ece;
@@ -362,4 +364,16 @@ struct rdma_ucm_resolve_ib_service { · 52 unmodified lines
362364 __u32 id;
363365 struct rdma_ucm_ib_service ibs;
364366 };
367+
368+struct rdma_ucm_write_cm_event {
369+ __u32 id;
370+ __u32 reserved;
371+ __u32 event;
372+ __u32 status;
373+ union {
374+ struct rdma_ucm_conn_param conn;
375+ struct rdma_ucm_ud_param ud;
376+ __u64 arg;
377+ } param;
378+};
365379 #endif /* RDMA_USER_CM_H */