@@ -17,10 +17,10 @@ creates a completion queue (CQ) for RDMA device context
.I context\fR.
The argument
.I cq_attr
-is a pointer to struct ibv_create_cq_attr_ex as defined in <infiniband/verbs.h>.
+is a pointer to struct ibv_cq_init_attr_ex as defined in <infiniband/verbs.h>.
.PP
.nf
-struct ibv_create_cq_attr_ex {
+struct ibv_cq_init_attr_ex {
.in +8
int cqe; /* Minimum number of entries required for CQ */
void *cq_context; /* Consumer-supplied context returned for completion events */
@@ -28,6 +28,7 @@ struct ibv_comp_channel *channel; /* Completion channel where completio
int comp_vector; /* Completion vector used to signal completion events. Must be >= 0 and < context->num_comp_vectors. */
uint64_t wc_flags; /* The wc_flags that should be returned in ibv_poll_cq_ex. Or'ed bit of enum ibv_wc_flags_ex. */
uint32_t comp_mask; /* compatibility mask (extended verb). */
+uint32_t flags /* One or more flags from enum ibv_create_cq_attr_flags */
.in -8
};
@@ -40,6 +41,7 @@ enum ibv_wc_flags_ex {
IBV_WC_EX_WITH_SL = 1 << 5, /* Require sl in WC */
IBV_WC_EX_WITH_DLID_PATH_BITS = 1 << 6, /* Require dlid path bits in WC */
IBV_WC_EX_WITH_COMPLETION_TIMESTAMP = 1 << 7, /* Require completion timestamp in WC /*
+ IBV_WC_EX_WITH_CVLAN = 1 << 8, /* Require VLAN info in WC */
};
enum ibv_cq_init_attr_mask {
@@ -128,6 +130,9 @@ Below members and functions are used in order to poll the current completion. Th
.BI "uint64_t ibv_wc_read_completion_ts(struct ibv_cq_ex " "*cq"); \c
Get the completion timestamp from the current completion.
+.BI "uint16_t ibv_wc_read_cvlan(struct ibv_cq_ex " "*cq"); \c
+ Get the CVLAN field from the current completion.
+
.SH "RETURN VALUE"
.B ibv_create_cq_ex()
returns a pointer to the CQ, or NULL if the request fails.
@@ -435,6 +435,7 @@ enum ibv_create_cq_wc_flags {
IBV_WC_EX_WITH_SL = 1 << 5,
IBV_WC_EX_WITH_DLID_PATH_BITS = 1 << 6,
IBV_WC_EX_WITH_COMPLETION_TIMESTAMP = 1 << 7,
+ IBV_WC_EX_WITH_CVLAN = 1 << 8,
};
enum {
@@ -449,7 +450,8 @@ enum {
enum {
IBV_CREATE_CQ_SUP_WC_FLAGS = IBV_WC_STANDARD_FLAGS |
- IBV_WC_EX_WITH_COMPLETION_TIMESTAMP
+ IBV_WC_EX_WITH_COMPLETION_TIMESTAMP |
+ IBV_WC_EX_WITH_CVLAN
};
enum ibv_wc_flags {
@@ -1092,6 +1094,7 @@ struct ibv_cq_ex {
uint8_t (*read_sl)(struct ibv_cq_ex *current);
uint8_t (*read_dlid_path_bits)(struct ibv_cq_ex *current);
uint64_t (*read_completion_ts)(struct ibv_cq_ex *current);
+ uint16_t (*read_cvlan)(struct ibv_cq_ex *current);
};
static inline struct ibv_cq *ibv_cq_ex_to_cq(struct ibv_cq_ex *cq)
@@ -1170,6 +1173,11 @@ static inline uint64_t ibv_wc_read_completion_ts(struct ibv_cq_ex *cq)
return cq->read_completion_ts(cq);
}
+static inline uint16_t ibv_wc_read_cvlan(struct ibv_cq_ex *cq)
+{
+ return cq->read_cvlan(cq);
+}
+
static inline int ibv_post_wq_recv(struct ibv_wq *wq,
struct ibv_recv_wr *recv_wr,
struct ibv_recv_wr **bad_recv_wr)