summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
diff options
context:
space:
mode:
authorChris Mi <cmi@nvidia.com>2021-01-26 11:15:46 +0800
committerSaeed Mahameed <saeedm@nvidia.com>2021-04-06 21:36:04 -0700
commitbe9dc0047450f7d8c0462a6ef3f7c26bced16911 (patch)
treec5563fe333fdf3d09e61512495e3aa24c844e53a /drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
parent7319a1cc3ca9f719e4ef1b1882f6fdb57d0719b8 (diff)
net/mlx5e: TC, Handle sampled packets
Mark the sampled packets with a sample restore object. Send sampled packets using the psample api. Signed-off-by: Chris Mi <cmi@nvidia.com> Reviewed-by: Oz Shlomo <ozsh@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/eswitch.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/eswitch.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
index 9b26bd67e2b8..ed4d7f8f798f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
@@ -50,12 +50,18 @@
enum mlx5_mapped_obj_type {
MLX5_MAPPED_OBJ_CHAIN,
+ MLX5_MAPPED_OBJ_SAMPLE,
};
struct mlx5_mapped_obj {
enum mlx5_mapped_obj_type type;
union {
u32 chain;
+ struct {
+ u32 group_id;
+ u32 rate;
+ u32 trunc_size;
+ } sample;
};
};