Changeset View
Changeset View
Standalone View
Standalone View
contrib/ofed/libibverbs/man/ibv_exp_create_wq.3
- This file was added.
.\" -*- nroff -*- | |||||
.\" | |||||
.TH IBV_EXP_CREATE_WQ 3 2015-08-04 libibverbs "Libibverbs Programmer's Manual" | |||||
.SH "NAME" | |||||
ibv_exp_create_wq, ibv_exp_destroy_wq \- create or destroy a Work Queue (WQ). | |||||
.SH "SYNOPSIS" | |||||
.nf | |||||
.B #include <infiniband/verbs_exp.h> | |||||
.sp | |||||
.BI "struct ibv_exp_wq *ibv_exp_create_wq(struct ibv_context " "*context," | |||||
.BI " struct ibv_exp_wq_init_attr " "*wq_init_attr" ); | |||||
.sp | |||||
.BI "int ibv_exp_destroy_wq(struct ibv_exp_wq " "*wq" ); | |||||
.fi | |||||
.SH "DESCRIPTION" | |||||
.B ibv_exp_create_wq() | |||||
creates a WQ associated with the ibv_context | |||||
.I context\fR. | |||||
The argument | |||||
.I wq_init_attr | |||||
is an ibv_exp_wq_init_attr struct, as defined in <infiniband/verbs_exp.h>. | |||||
.PP | |||||
.nf | |||||
struct ibv_exp_wq_init_attr { | |||||
.in +8 | |||||
void *wq_context; /* Associated context of the WQ */ | |||||
enum ibv_exp_wq_type wq_type; /* WQ type */ | |||||
uint32_t max_recv_wr; /* Requested max number of outstanding WRs in the RQ */ | |||||
uint32_t max_recv_sge; /* Requested max receive number of scatter/gather (s/g) elements per WR in the RQ */ | |||||
struct ibv_pd *pd; /* PD to be associated with the WQ */ | |||||
struct ibv_cq *cq; /* CQ to be associated with the WQ */ | |||||
struct ibv_srq *srq; /* SRQ handle if WQ is of type IBV_EXP_WQT_SRQ, otherwise NULL */ | |||||
uint32_t comp_mask; /* Identifies valid fields. Use ibv_exp_wq_init_attr_mask */ | |||||
struct ibv_exp_res_domain *res_domain; /* Provides resource domain to indicate the WQ threading and message model */ | |||||
struct ibv_exp_wq_mp_rq mp_rq; /* Provides multi-packet data for receive WQ */ | |||||
.in -8 | |||||
}; | |||||
struct ibv_exp_wq_mp_rq { | |||||
.in +8 | |||||
enum ibv_exp_mp_rq_shifts use_shift; /* Shift to use for received payload */ | |||||
uint8_t single_wqe_log_num_of_strides; /* Log of number of strides for single WQE */ | |||||
uint8_t single_stride_log_num_of_bytes; /* Log of number of bytes in single stride */ | |||||
.in -8 | |||||
}; | |||||
.fi | |||||
.PP | |||||
The function | |||||
.B ibv_exp_create_wq() | |||||
will update the | |||||
.I wq_init_attr\fB\fR->max_recv_wr | |||||
and | |||||
.I wq_init_attr\fB\fR->max_recv_sge | |||||
fields with the actual \s-1WQ\s0 values of the WQ that was created; | |||||
the values will be greater than or equal to the values requested. | |||||
.PP | |||||
.B ibv_exp_destroy_wq() | |||||
destroys the WQ | |||||
.I wq\fR. | |||||
.SH "RETURN VALUE" | |||||
.B ibv_exp_create_wq() | |||||
returns a pointer to the created WQ, or NULL if the request fails. | |||||
.PP | |||||
.B ibv_exp_destroy_wq() | |||||
returns 0 on success, or the value of errno on failure (which indicates the failure reason). | |||||
.SH "NOTES" | |||||
.PP | |||||
The attributes max_recv_wr and max_recv_sge are ignored by | |||||
.B ibv_exp_create_wq() | |||||
if the WQ is to be associated with an SRQ. | |||||
.SH "SEE ALSO" | |||||
.BR ibv_exp_modify_wq (3), | |||||
.SH "AUTHORS" | |||||
.TP | |||||
Yishai Hadas <yishaih@mellanox.com> |