]> git.droids-corp.org - dpdk.git/commitdiff
common/mlx5: support more fields in DevX CQ create
authorDekel Peled <dekelp@mellanox.com>
Sun, 19 Jul 2020 11:10:46 +0000 (14:10 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Jul 2020 13:46:30 +0000 (15:46 +0200)
Update CQ create operation using DevX API, support additional fields.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
drivers/common/mlx5/mlx5_devx_cmds.c
drivers/common/mlx5/mlx5_devx_cmds.h

index c412419ef6b96907d6566195a5506f34453eb4eb..d1c674c7cf37860a7eb4f22725c5ae0fcf773be3 100644 (file)
@@ -1449,6 +1449,9 @@ mlx5_devx_cmd_create_cq(void *ctx, struct mlx5_devx_cq_attr *attr)
                 MLX5_ADAPTER_PAGE_SHIFT);
        MLX5_SET(cqc, cqctx, c_eqn, attr->eqn);
        MLX5_SET(cqc, cqctx, uar_page, attr->uar_page_id);
+       MLX5_SET(cqc, cqctx, cqe_comp_en, attr->cqe_comp_en);
+       MLX5_SET(cqc, cqctx, mini_cqe_res_format, attr->mini_cqe_res_format);
+       MLX5_SET(cqc, cqctx, cqe_sz, attr->cqe_size);
        if (attr->q_umem_valid) {
                MLX5_SET(create_cq_in, in, cq_umem_valid, attr->q_umem_valid);
                MLX5_SET(create_cq_in, in, cq_umem_id, attr->q_umem_id);
index ab61454276e6f5ec7d3e94555b33b2bc5caee741..528cb7bdd1b7290bfaf0a3f4ff81bb7436fc3635 100644 (file)
@@ -243,6 +243,8 @@ struct mlx5_devx_cq_attr {
        uint32_t db_umem_valid:1;
        uint32_t use_first_only:1;
        uint32_t overrun_ignore:1;
+       uint32_t cqe_comp_en:1;
+       uint32_t mini_cqe_res_format:2;
        uint32_t cqe_size:3;
        uint32_t log_cq_size:5;
        uint32_t log_page_size:5;