Skip to contentSkip to conversation

fix MMO QP usage

PATCH Applied Raja Zidane 3 participants 6 messages Oct 28, 2021 – Nov 8, 2021

lore
Share & tools
lore
#0 lore raw

cover fix MMO QP usage

0x20 reserved bytes were missed in the HCA cap PRM structure before the newly added fields for MMO QP capabilities, that caused reading MMO QP caps incorrectly.
The QP extension valid bit was not set in the QP creation for MMO configuration.
That caused the QP not to be connected to the GGA MMO engines, and any MMO WQE job got CQE with an error.

Raja Zidane (2):
common/mlx5: fix HCA cap PRM alignment
common/mlx5: fix MMO configuration in QP

 drivers/common/mlx5/mlx5_devx_cmds.c | 2 ++
 drivers/common/mlx5/mlx5_prm.h       | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 common/mlx5: fix HCA cap PRM alignment

0x20 reserved bytes were missed in the HCA cap PRM structure before the newly added fields for MMO QP capabilities.
That caused reading MMO QP caps incorrectly.
Add the reserved fields in the HCA cap structure.

Fixes cbc4c13a255e ("common/mlx5: update MMO HCA capabilities")
---
 drivers/common/mlx5/mlx5_prm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/common/mlx5/mlx5_prm.h +1 -1
index eab80eaead..f14727877c 100644
@@ -1636,7 +1636,7 @@ struct mlx5_ifc_cmd_hca_cap_bits {
 	u8 num_vhca_ports[0x8];
 	u8 reserved_at_618[0x6];
 	u8 sw_owner_id[0x1];
-	u8 reserved_at_61f[0x109];
+	u8 reserved_at_61f[0x129];
 	u8 dma_mmo_qp[0x1];
 	u8 regexp_mmo_qp[0x1];
 	u8 compress_mmo_qp[0x1];
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/2 common/mlx5: fix MMO configuration in QP

In reply to Raja Zidane

The QP extension valid bit was not set in the QP creation for MMO configuration.
That caused the QP not to be connected to the GGA MMO engines, and any MMO WQE job got CQE with an error.
Set the QP ext bit when MMO is configured.

Fixes ddda0006188a ("common/mlx5: add MMO configuration for DevX queue pair")
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/common/mlx5/mlx5_devx_cmds.c +2 -0
index fb7c8e986f..4f6a73510d 100644
@@ -2055,6 +2055,8 @@ mlx5_devx_cmd_create_qp(void *ctx,
 				in, qpc_extension_and_pas_list);
 			void *qpc_ext = MLX5_ADDR_OF(qpc_extension_and_pas_list,
 				qpc_ext_and_pas_list, qpc_data_extension);
+
+			MLX5_SET(create_qp_in, in, qpc_ext, 1);
 			MLX5_SET(qpc_extension, qpc_ext, mmo, 1);
 		}
 		MLX5_SET(qpc, qpc, pm_state, MLX5_QP_PM_MIGRATED);
Signature · 1 line
2.17.1
#3 lore raw
In reply to Raja Zidane

From: Raja Zidane

Quoted 8 lines

0x20 reserved bytes were missed in the HCA cap PRM structure before the newly added fields for MMO QP capabilities, that caused reading MMO QP caps incorrectly.
The QP extension valid bit was not set in the QP creation for MMO configuration.
That caused the QP not to be connected to the GGA MMO engines, and any MMO WQE job got CQE with an error.

Quoted 7 lines

Raja Zidane (2):
common/mlx5: fix HCA cap PRM alignment
common/mlx5: fix MMO configuration in QP

 drivers/common/mlx5/mlx5_devx_cmds.c | 2 ++
 drivers/common/mlx5/mlx5_prm.h       | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
#4 lore raw

28/10/2021 20:17, Matan Azrad:

Quoted 13 lines

From: Raja Zidane

Quoted 12 lines

0x20 reserved bytes were missed in the HCA cap PRM structure before the newly added fields for MMO QP capabilities, that caused reading MMO QP caps incorrectly.
The QP extension valid bit was not set in the QP creation for MMO configuration.
That caused the QP not to be connected to the GGA MMO engines, and any MMO WQE job got CQE with an error.

Raja Zidane (2):
common/mlx5: fix HCA cap PRM alignment
common/mlx5: fix MMO configuration in QP

Quoted 5 lines
Quoted 3 lines
 drivers/common/mlx5/mlx5_devx_cmds.c | 2 ++
 drivers/common/mlx5/mlx5_prm.h       | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

Applied, thanks.

#5 lore raw
In reply to Raja Zidane

From: Raja Zidane

Quoted 8 lines

0x20 reserved bytes were missed in the HCA cap PRM structure before the newly added fields for MMO QP capabilities, that caused reading MMO QP caps incorrectly.
The QP extension valid bit was not set in the QP creation for MMO configuration.
That caused the QP not to be connected to the GGA MMO engines, and any MMO WQE job got CQE with an error.

Quoted 7 lines

Raja Zidane (2):
common/mlx5: fix HCA cap PRM alignment
common/mlx5: fix MMO configuration in QP

 drivers/common/mlx5/mlx5_devx_cmds.c | 2 ++
 drivers/common/mlx5/mlx5_prm.h       | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
Quoted 2 lines

--
2.17.1