[v1,24/38] common/mlx5: allow type configuration for DevX RQT
diff mbox series

Message ID 1579539790-3882-25-git-send-email-matan@mellanox.com
State Superseded
Delegated to: Maxime Coquelin
Headers show
Series
  • Introduce mlx5 vDPA driver
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Matan Azrad Jan. 20, 2020, 5:02 p.m. UTC
Allow virtio queue type configuration in the RQ table.
The needed fields and configuration was added.

Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 1 +
 drivers/common/mlx5/mlx5_devx_cmds.h | 1 +
 drivers/common/mlx5/mlx5_prm.h       | 5 +++--
 3 files changed, 5 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index f843606..3b0d7bd 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -844,6 +844,7 @@  struct mlx5_devx_obj *
 	}
 	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++)
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index 63c84f8..065b02a 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -179,6 +179,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[];
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index 2c0e023..52b1aa1 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -1720,8 +1720,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];