Add to the "system_image_guid" filed describing uniquely the physical device into "mlx5_hca_attr" structure.
Signed-off-by: Michael Baum <michae...@nvidia.com> --- drivers/common/mlx5/mlx5_devx_cmds.c | 10 ++++++---- drivers/common/mlx5/mlx5_devx_cmds.h | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index 3eeb27fc3f..74609e7cb2 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -518,8 +518,11 @@ mlx5_devx_cmd_query_nic_vport_context(void *ctx, } vctx = MLX5_ADDR_OF(query_nic_vport_context_out, out, nic_vport_context); - attr->vport_inline_mode = MLX5_GET(nic_vport_context, vctx, - min_wqe_inline_mode); + if (attr->wqe_inline_mode == MLX5_CAP_INLINE_MODE_VPORT_CONTEXT) + attr->vport_inline_mode = MLX5_GET(nic_vport_context, vctx, + min_wqe_inline_mode); + attr->system_image_guid = MLX5_GET64(nic_vport_context, vctx, + system_image_guid); return 0; } @@ -1348,8 +1351,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx, } attr->qp_ts_format = MLX5_GET(roce_caps, hcattr, qp_ts_format); } - if (attr->eth_virt && - attr->wqe_inline_mode == MLX5_CAP_INLINE_MODE_VPORT_CONTEXT) { + if (attr->eth_virt) { rc = mlx5_devx_cmd_query_nic_vport_context(ctx, 0, attr); if (rc) { attr->eth_virt = 0; diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h index b814c8becc..56ed911c2a 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.h +++ b/drivers/common/mlx5/mlx5_devx_cmds.h @@ -321,6 +321,7 @@ struct mlx5_hca_attr { uint32_t lag_rx_port_affinity:1; uint32_t wqe_based_flow_table_sup:1; uint8_t max_header_modify_pattern_length; + uint64_t system_image_guid; }; /* LAG Context. */ -- 2.25.1