Commit b7ba743a authored by Yevgeny Kliteynik's avatar Yevgeny Kliteynik Committed by Saeed Mahameed
Browse files

net/mlx5: DR, Check for modify_header_argument device capabilities

parent 2533e726
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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
	 */
+3 −0
Original line number Diff line number Diff line
@@ -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;
};