common/mlx5: allow type configuration for DevX RQT
authorMatan Azrad <matan@mellanox.com>
Wed, 29 Jan 2020 12:38:42 +0000 (12:38 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 5 Feb 2020 08:51:20 +0000 (09:51 +0100)
Allow virtio queue type configuration in the RQ table.
The needed fields and configuration was added.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
drivers/common/mlx5/mlx5_devx_cmds.c
drivers/common/mlx5/mlx5_devx_cmds.h
drivers/common/mlx5/mlx5_prm.h

index e7288c8..e372df6 100644 (file)
@@ -846,6 +846,7 @@ mlx5_devx_cmd_create_rqt(struct ibv_context *ctx,
        }
        MLX5_SET(create_rqt_in, in, opcode, MLX5_CMD_OP_CREATE_RQT);
        rqt_ctx = MLX5_ADDR_OF(create_rqt_in, in, rqt_context);
+       MLX5_SET(rqtc, rqt_ctx, list_q_type, rqt_attr->rq_type);
        MLX5_SET(rqtc, rqt_ctx, rqt_max_size, rqt_attr->rqt_max_size);
        MLX5_SET(rqtc, rqt_ctx, rqt_actual_size, rqt_attr->rqt_actual_size);
        for (i = 0; i < rqt_attr->rqt_actual_size; i++)
index d1a21b8..9ef3ce2 100644 (file)
@@ -188,6 +188,7 @@ struct mlx5_devx_tir_attr {
 
 /* RQT attributes structure, used by RQT operations. */
 struct mlx5_devx_rqt_attr {
+       uint8_t rq_type;
        uint32_t rqt_max_size:16;
        uint32_t rqt_actual_size:16;
        uint32_t rq_list[];
index e53dd61..000ba1f 100644 (file)
@@ -1734,8 +1734,9 @@ struct mlx5_ifc_rq_num_bits {
 };
 
 struct mlx5_ifc_rqtc_bits {
-       u8 reserved_at_0[0xa0];
-       u8 reserved_at_a0[0x10];
+       u8 reserved_at_0[0xa5];
+       u8 list_q_type[0x3];
+       u8 reserved_at_a8[0x8];
        u8 rqt_max_size[0x10];
        u8 reserved_at_c0[0x10];
        u8 rqt_actual_size[0x10];