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().
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -68,7 +68,8 @@ enum { · 67 unmodified lines | |||
| 68 | RDMA_USER_CM_CMD_BIND, | 68 | RDMA_USER_CM_CMD_BIND, |
| 69 | RDMA_USER_CM_CMD_RESOLVE_ADDR, | 69 | RDMA_USER_CM_CMD_RESOLVE_ADDR, |
| 70 | RDMA_USER_CM_CMD_JOIN_MCAST, | 70 | 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, | ||
| 72 | }; | 73 | }; |
| 73 | 74 | ||
| 74 | /* See IBTA Annex A11, servies ID bytes 4 & 5 */ | 75 | /* See IBTA Annex A11, servies ID bytes 4 & 5 */ |
| @@ -304,6 +305,7 @@ struct rdma_ucm_event_resp { · 229 unmodified lines | |||
| 304 | union { | 305 | union { |
| 305 | struct rdma_ucm_conn_param conn; | 306 | struct rdma_ucm_conn_param conn; |
| 306 | struct rdma_ucm_ud_param ud; | 307 | struct rdma_ucm_ud_param ud; |
| 308 | __u32 arg32[2]; | ||
| 307 | } param; | 309 | } param; |
| 308 | __u32 reserved; | 310 | __u32 reserved; |
| 309 | struct rdma_ucm_ece ece; | 311 | struct rdma_ucm_ece ece; |
| @@ -362,4 +364,16 @@ struct rdma_ucm_resolve_ib_service { · 52 unmodified lines | |||
| 362 | __u32 id; | 364 | __u32 id; |
| 363 | struct rdma_ucm_ib_service ibs; | 365 | struct rdma_ucm_ib_service ibs; |
| 364 | }; | 366 | }; |
| 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 | }; | ||
| 365 | #endif /* RDMA_USER_CM_H */ | 379 | #endif /* RDMA_USER_CM_H */ |