[PATCH v2 10/23] common/mlx5: query GENEVE option sample ID from HCA attr
Michael Baum
michaelba at nvidia.com
Thu Jan 25 14:30:30 CET 2024
This patch adds the GENEVE option sample ID into HCA attribute
structure.
This sample ID is used as the input of
"mlx5_devx_cmd_match_sample_info_query" function when flex parser
profile is 0.
Signed-off-by: Michael Baum <michaelba at nvidia.com>
Acked-by: Suanming Mou <suanmingm at nvidia.com>
---
drivers/common/mlx5/mlx5_devx_cmds.c | 2 ++
drivers/common/mlx5/mlx5_devx_cmds.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index b8f4a840e7..394149d542 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -973,6 +973,8 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
geneve_tlv_sample);
attr->query_match_sample_info = MLX5_GET(cmd_hca_cap, hcattr,
query_match_sample_info);
+ attr->geneve_tlv_option_sample_id = MLX5_GET(cmd_hca_cap, hcattr,
+ flex_parser_id_geneve_opt_0);
attr->qos.sup = MLX5_GET(cmd_hca_cap, hcattr, qos);
attr->wqe_index_ignore = MLX5_GET(cmd_hca_cap, hcattr,
wqe_index_ignore_cap);
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index 4f264560a9..7747c230de 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -216,6 +216,7 @@ struct mlx5_hca_attr {
uint32_t max_geneve_tlv_option_data_len:5;
uint32_t geneve_tlv_sample:1;
uint32_t geneve_tlv_option_offset:1;
+ uint32_t geneve_tlv_option_sample_id:4;
uint32_t hairpin:1;
uint32_t log_max_hairpin_queues:5;
uint32_t log_max_hairpin_wq_data_sz:5;
--
2.25.1
More information about the dev
mailing list