summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.h
diff options
context:
space:
mode:
authorChris Mi <cmi@nvidia.com>2021-06-21 10:49:50 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2021-08-20 07:50:38 +0300
commit2741f22309054a2100e47c0aef42159d3d266ebc (patch)
tree40341fdbcff83ec039e40775cea19d0216073c30 /drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.h
parentee950e5db1b9117683c72ebc8d857a3f463efc20 (diff)
downloadlinux-2741f22309054a2100e47c0aef42159d3d266ebc.tar.xz
net/mlx5e: TC, Support sample offload action for tunneled traffic
Currently the sample offload actions send the encapsulated packet to software. This commit decapsulates the packet before performing the sampling and set the tunnel properties on the skb metadata fields to make the behavior consistent with OVS sFlow. If decapsulating first, we can't use the same match like before in default table. So instantiate a post action instance to continue processing the action list. If HW can preserve reg_c, also use the post action instance. Signed-off-by: Chris Mi <cmi@nvidia.com> Reviewed-by: Oz Shlomo <ozsh@nvidia.com> Reviewed-by: Roi Dayan <roid@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/en/tc/sample.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.h b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.h
index 1bcf4d399ccd..db0146df9b30 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.h
@@ -8,6 +8,7 @@
struct mlx5_flow_attr;
struct mlx5e_tc_psample;
+struct mlx5e_post_act;
struct mlx5e_sample_attr {
u32 group_num;
@@ -15,7 +16,6 @@ struct mlx5e_sample_attr {
u32 trunc_size;
u32 restore_obj_id;
u32 sampler_id;
- struct mlx5_flow_table *sample_default_tbl;
struct mlx5e_sample_flow *sample_flow;
};
@@ -33,7 +33,7 @@ mlx5e_tc_sample_unoffload(struct mlx5e_tc_psample *sample_priv,
struct mlx5_flow_attr *attr);
struct mlx5e_tc_psample *
-mlx5e_tc_sample_init(struct mlx5_eswitch *esw);
+mlx5e_tc_sample_init(struct mlx5_eswitch *esw, struct mlx5e_post_act *post_act);
void
mlx5e_tc_sample_cleanup(struct mlx5e_tc_psample *tc_psample);