-*- nroff -*-
IBV_CREATE_XRC_RCV_QP 3 2008-02-10 libibverbs "Libibverbs Programmer's Manual"
"NAME"
ibv_create_xrc_rcv_qp - create an XRC queue pair (QP) for serving as a receive-side only QP
"SYNOPSIS"
#include <infiniband/verbs.h> "int ibv_create_xrc_rcv_qp(struct ibv_qp_init_attr " "*init_attr" , " uint32_t " "*xrc_rcv_qpn" );
"DESCRIPTION"
ibv_create_xrc_rcv_qp() creates an XRC queue pair (QP) for serving as a receive-side only QP and returns its number through the pointer
xrc_rcv_qpn. This QP number should be passed to the remote node (sender).
The remote node will use
xrc_rcv_qpn in
ibv_post_send() when sending to an XRC SRQ on this host in the same xrc domain as the XRC receive QP.
This QP is created in kernel space, and persists until the last process registered for the QP
calls
ibv_unreg_xrc_rcv_qp() (at which time the QP is destroyed).
The process which creates this QP is automatically registered for it, and should also call ibv_unreg_xrc_rcv_qp() at some point, to unregister. Processes which wish to receive on an XRC SRQ via this QP should call ibv_reg_xrc_rcv_qp() for this QP, to guarantee that the QP will not be destroyed while they are still using it for receiving on the XRC SRQ.
The argument qp_init_attr is an ibv_qp_init_attr struct, as defined in <infiniband/verbs.h>.
struct ibv_qp_init_attr { void *qp_context; /* value is being ignored */ struct ibv_cq *send_cq; /* value is being ignored */ struct ibv_cq *recv_cq; /* value is being ignored */ struct ibv_srq *srq; /* value is being ignored */ struct ibv_qp_cap cap; /* value is being ignored */ enum ibv_qp_type qp_type; /* value is being ignored */ int sq_sig_all; /* value is being ignored */ struct ibv_xrc_domain *xrc_domain; /* XRC domain the QP will be associated with */ };
Most of the attributes in qp_init_attr are being ignored because this QP is a receive only QP and all RR are being posted to an SRQ.
"RETURN VALUE"
ibv_create_xrc_rcv_qp() returns 0 on success, or the value of errno on failure (which indicates the failure reason).
"SEE ALSO"
ibv_open_xrc_domain (3), ibv_modify_xrc_rcv_qp (3), ibv_query_xrc_rcv_qp (3), ibv_reg_xrc_rcv_qp (3), ibv_unreg_xrc_rcv_qp (3), ibv_post_send (3) "AUTHORS"
Dotan Barak <dotanb@mellanox.co.il>