@@ -37,6 +37,7 @@ enum mlx5dv_context_flags {
MLX5DV_CONTEXT_FLAGS_CQE_V1 = (1 << 0),
MLX5DV_CONTEXT_FLAGS_MPW = (1 << 1), /* Obsoleted */
MLX5DV_CONTEXT_FLAGS_MPW_ALLOWED = (1 << 2), /* Multi packet WQE is allowed */
+ MLX5DV_CONTEXT_FLAGS_ENHANCED_MPW = (1 << 3), /* Enhanced multi packet WQE is supported or not */
.in -8
};
.fi
@@ -276,6 +276,7 @@ struct mlx5_packet_pacing_caps {
enum mlx5_mpw_caps {
MLX5_MPW_RESERVED = 1 << 0, /* Obsoleted, don't use */
MLX5_ALLOW_MPW = 1 << 1,
+ MLX5_SUPPORT_EMPW = 1 << 2,
};
struct mlx5_query_device_ex_resp {
@@ -633,6 +633,9 @@ int mlx5dv_query_device(struct ibv_context *ctx_in,
comp_mask_out |= MLX5DV_CONTEXT_MASK_CQE_COMPRESION;
}
+ if (mctx->vendor_cap_flags & MLX5_VENDOR_CAP_FLAGS_ENHANCED_MPW)
+ attrs_out->flags |= MLX5DV_CONTEXT_FLAGS_ENHANCED_MPW;
+
attrs_out->comp_mask = comp_mask_out;
return 0;
@@ -184,6 +184,7 @@ enum {
enum mlx5_vendor_cap_flags {
MLX5_VENDOR_CAP_FLAGS_MPW = 1 << 0, /* Obsoleted */
MLX5_VENDOR_CAP_FLAGS_MPW_ALLOWED = 1 << 1,
+ MLX5_VENDOR_CAP_FLAGS_ENHANCED_MPW = 1 << 2,
};
enum {
@@ -83,6 +83,7 @@ enum mlx5dv_context_flags {
MLX5DV_CONTEXT_FLAGS_CQE_V1 = (1 << 0),
MLX5DV_CONTEXT_FLAGS_MPW = (1 << 1), /* Obsoleted */
MLX5DV_CONTEXT_FLAGS_MPW_ALLOWED = (1 << 2),
+ MLX5DV_CONTEXT_FLAGS_ENHANCED_MPW = (1 << 3),
};
enum mlx5dv_cq_init_attr_mask {
@@ -1968,6 +1968,9 @@ int mlx5_query_device_ex(struct ibv_context *context,
if (resp.support_multi_pkt_send_wqe & MLX5_ALLOW_MPW)
mctx->vendor_cap_flags |= MLX5_VENDOR_CAP_FLAGS_MPW_ALLOWED;
+ if (resp.support_multi_pkt_send_wqe & MLX5_SUPPORT_EMPW)
+ mctx->vendor_cap_flags |= MLX5_VENDOR_CAP_FLAGS_ENHANCED_MPW;
+
mctx->cqe_comp_caps = resp.cqe_comp_caps;
major = (raw_fw_ver >> 32) & 0xffff;