net/mlx5: DR, Check for modify_header_argument device capabilities

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Alex Vesker <valex@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
Yevgeny Kliteynik 2022-08-30 01:21:10 +03:00 committed by Saeed Mahameed
parent 2533e726f4
commit b7ba743a2f
2 changed files with 14 additions and 0 deletions

View File

@ -132,6 +132,17 @@ int mlx5dr_cmd_query_device(struct mlx5_core_dev *mdev,
caps->isolate_vl_tc = MLX5_CAP_GEN(mdev, isolate_vl_tc_new);
caps->support_modify_argument =
MLX5_CAP_GEN_64(mdev, general_obj_types) &
MLX5_GENERAL_OBJ_TYPES_CAP_HEADER_MODIFY_ARGUMENT;
if (caps->support_modify_argument) {
caps->log_header_modify_argument_granularity =
MLX5_CAP_GEN(mdev, log_header_modify_argument_granularity);
caps->log_header_modify_argument_max_alloc =
MLX5_CAP_GEN(mdev, log_header_modify_argument_max_alloc);
}
/* geneve_tlv_option_0_exist is the indication of
* STE support for lookup type flex_parser_ok
*/

View File

@ -896,6 +896,9 @@ struct mlx5dr_cmd_caps {
struct mlx5dr_vports vports;
bool prio_tag_required;
struct mlx5dr_roce_cap roce_caps;
u16 log_header_modify_argument_granularity;
u16 log_header_modify_argument_max_alloc;
bool support_modify_argument;
u8 is_ecpf:1;
u8 isolate_vl_tc:1;
};