Allocates a communication identifier.
#include <rdma/rdma_cma.h> int rdma_create_id(struct rdma_event_channel *channel, struct rdma_cm_id **id, void *context, enum rdma_port_space ps);
The rdma_create_id function creates an identifier that is used to track communication information.
| channel | Specifies the communication channel that the events associated with the allocated rdma_cm_id are reported on. |
| id | Specifies a reference where the allocated communication identifier will be returned. |
| context | Indicates the user specified context associated with the rdma_cm_id. |
| ps | Specifies the RDMA port space. |
| 0 | On success. |
| -1 | Error, see errno. |
| -EINVAL | If the channel or id parameter is NULL or unable to query RDMA device. |
| -EPROTONOSUPPORT | ps is not RDMA_PS_TCP. |
| -ENOMEM | There is not enough memory to allocate the id by malloc. |
| -ENODATA | The write operation on channel->fd failed. |
| -ENODEV | Unable to get the RDMA device . |