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 1.

Signed-off-by: Michael Baum <michae...@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 b30f54ab1c..332aebbe57 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 3f294e8f04..1daf2fcca4 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

Reply via email to