@@ -1894,6 +1894,15 @@ int ibv_cmd_create_wq(struct ibv_context *context,
cmd->max_wr = wq_init_attr->max_wr;
cmd->comp_mask = 0;
+ if (cmd_core_size >= offsetof(struct ibv_create_wq, create_flags) +
+ sizeof(cmd->create_flags)) {
+ if (wq_init_attr->comp_mask & IBV_WQ_INIT_ATTR_FLAGS) {
+ if (wq_init_attr->create_flags & ~(IBV_WQ_FLAGS_RESERVED - 1))
+ return EOPNOTSUPP;
+ cmd->create_flags = wq_init_attr->create_flags;
+ }
+ }
+
err = write(context->cmd_fd, cmd, cmd_size);
if (err != cmd_size)
return errno;
@@ -1927,6 +1936,15 @@ int ibv_cmd_modify_wq(struct ibv_wq *wq, struct ibv_wq_attr *attr,
cmd->curr_wq_state = attr->curr_wq_state;
cmd->wq_state = attr->wq_state;
+ if (cmd_core_size >= offsetof(struct ibv_modify_wq, flags_mask) +
+ sizeof(cmd->flags_mask)) {
+ if (attr->attr_mask & IBV_WQ_ATTR_FLAGS) {
+ if (attr->flags_mask & ~(IBV_WQ_FLAGS_RESERVED - 1))
+ return EOPNOTSUPP;
+ cmd->flags = attr->flags;
+ cmd->flags_mask = attr->flags_mask;
+ }
+ }
cmd->wq_handle = wq->handle;
cmd->attr_mask = attr->attr_mask;
@@ -1249,6 +1249,8 @@ struct ibv_create_wq {
__u32 cq_handle;
__u32 max_wr;
__u32 max_sge;
+ __u32 create_flags;
+ __u32 reserved;
};
struct ibv_create_wq_resp {
@@ -1279,6 +1281,8 @@ struct ibv_modify_wq {
__u32 wq_handle;
__u32 wq_state;
__u32 curr_wq_state;
+ __u32 flags;
+ __u32 flags_mask;
};
struct ibv_create_rwq_ind_table {
@@ -667,7 +667,13 @@ enum ibv_wq_type {
};
enum ibv_wq_init_attr_mask {
- IBV_WQ_INIT_ATTR_RESERVED = 1 << 0,
+ IBV_WQ_INIT_ATTR_FLAGS = 1 << 0,
+ IBV_WQ_INIT_ATTR_RESERVED = 1 << 1,
+};
+
+enum ibv_wq_flags {
+ IBV_WQ_FLAGS_CVLAN_STRIPPING = 1 << 0,
+ IBV_WQ_FLAGS_RESERVED = 1 << 1,
};
struct ibv_wq_init_attr {
@@ -678,6 +684,7 @@ struct ibv_wq_init_attr {
struct ibv_pd *pd;
struct ibv_cq *cq;
uint32_t comp_mask;
+ uint32_t create_flags; /* use ibv_wq_flags */
};
enum ibv_wq_state {
@@ -690,7 +697,8 @@ enum ibv_wq_state {
enum ibv_wq_attr_mask {
IBV_WQ_ATTR_STATE = 1 << 0,
IBV_WQ_ATTR_CURR_STATE = 1 << 1,
- IBV_WQ_ATTR_RESERVED = 1 << 2
+ IBV_WQ_ATTR_FLAGS = 1 << 2,
+ IBV_WQ_ATTR_RESERVED = 1 << 3,
};
struct ibv_wq_attr {
@@ -700,6 +708,8 @@ struct ibv_wq_attr {
enum ibv_wq_state wq_state;
/* Assume this is the current WQ state */
enum ibv_wq_state curr_wq_state;
+ uint32_t flags; /* Use ibv_wq_flags */
+ uint32_t flags_mask; /* Use ibv_wq_flags */
};
/*