IBV_REG_XRC_RCV_QP(3)

NAME
ibv_reg_xrc_rcv_qp, ibv_unreg_xrc_rcv_qp - register and unregister a user process with an XRC receive queue pair (QP)

SYNOPSIS
#include <infiniband/verbs.h>

int ibv_reg_xrc_rcv_qp(struct ibv_xrc_domain *xrc_domain, uint32_t xrc_qp_num);
int ibv_unreg_xrc_rcv_qp(struct ibv_xrc_domain *xrc_domain, uint32_t xrc_qp_num);

DESCRIPTION
ibv_reg_xrc_rcv_qp() registers a user process with the XRC receive QP (created via ibv_create_xrc_rcv_qp() ) whose number is xrc_qp_num, and which is associated with the XRC domain xrc_domain.

ibv_unreg_xrc_rcv_qp() unregisters a user process from the XRC receive QP number xrc_qp_num, which is associated with the XRC domain xrc_domain. When the number of user processes registered with this XRC receive QP drops to zero, the QP is destroyed.

RETURN VALUE
ibv_reg_xrc_rcv_qp() and ibv_unreg_xrc_rcv_qp() returns 0 on success, or the value of errno on failure (which indicates the failure reason).

NOTES
ibv_reg_xrc_rcv_qp() and ibv_unreg_xrc_rcv_qp() may fail if the number xrc_qp_num is not a number of a valid XRC receive QP (the QP is not allocated or it is the number of a non-XRC QP), or the XRC receive QP was created with an XRC domain other than xrc_domain. If a process is still registered with any XRC RCV QPs belonging to some domain, ibv_close_xrc_domain() will return failure if called for that domain in that process. ibv_create_xrc_rcv_qp() performs an implicit registration for the creating process; when that process is finished with the XRC RCV QP, it should call ibv_unreg_xrc_rcv_qp() for that QP. Note that if no other processes are registered with the QP at this time, its registration count will drop to zero and it will be destroyed.

SEE ALSO
ibv_open_xrc_domain(3), ibv_create_xrc_rcv_qp(3)

AUTHORS

Dotan Barak <dotanb@mellanox.co.il>