1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
2 /* Copyright (c) 2021 Mellanox Technologies. */
4 #ifndef __MLX5_EN_TC_SAMPLE_H__
5 #define __MLX5_EN_TC_SAMPLE_H__
11 struct mlx5_flow_attr;
12 struct mlx5_esw_psample;
14 struct mlx5_sample_attr {
20 struct mlx5_flow_table *sample_default_tbl;
21 struct mlx5_sample_flow *sample_flow;
24 void mlx5_esw_sample_skb(struct sk_buff *skb, struct mlx5_mapped_obj *mapped_obj);
26 struct mlx5_flow_handle *
27 mlx5_esw_sample_offload(struct mlx5_esw_psample *sample_priv,
28 struct mlx5_flow_spec *spec,
29 struct mlx5_flow_attr *attr);
32 mlx5_esw_sample_unoffload(struct mlx5_esw_psample *sample_priv,
33 struct mlx5_flow_handle *rule,
34 struct mlx5_flow_attr *attr);
36 struct mlx5_esw_psample *
37 mlx5_esw_sample_init(struct mlx5e_priv *priv);
40 mlx5_esw_sample_cleanup(struct mlx5_esw_psample *esw_psample);
42 #endif /* __MLX5_EN_TC_SAMPLE_H__ */