Add support for unreliable connectionless mode
At this moment, the Infinband node supports RDMA_PS_TCP
. It is also possible to use RDMA_PS_UDP
:
RDMA_PS_TCP
Provides reliable, connection-oriented QP communication. Unlike TCP, the RDMA port space provides message, not stream, based communication.
RDMA_PS_UDP
Provides unreliable, connectionless QP communication. Supports both datagram and multicast communication.
RDMA_PS_TCP
and RDMA_PS_UDP
are mapped to the Queue Pair as IBV_QPT_RC
, IBV_QPT_UD
, respectively:
From librdmacm/cma.c
:
int rdma_create_id(struct rdma_event_channel *channel,
struct rdma_cm_id **id, void *context,
enum rdma_port_space ps)
/ ** SNIP **/
qp_type = (ps == RDMA_PS_IPOIB || ps == RDMA_PS_UDP) ?
IBV_QPT_UD : IBV_QPT_RC;
The operations the HCA can perform in unreliable connectionless mode are limited (see table below), but since our Infiniband node relays solely on IBV_WR_SEND(_WITH_IMM)
, this would work perfectly fine for us.
OPCODE | IBV_QPT_UD | IBV_QPT_UC | IBV_QPT_RC ----------------------------+------------+------------+----------- IBV_WR_SEND | X | X | X IBV_WR_SEND_WITH_IMM | X | X | X IBV_WR_RDMA_WRITE | | X | X IBV_WR_RDMA_WRITE_WITH_IMM | | X | X IBV_WR_RDMA_READ | | | X IBV_WR_ATOMIC_CMP_AND_SWP | | | X IBV_WR_ATOMIC_FETCH_AND_ADD | | | X