]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: TC, Restore tunnel info for sample offload
authorChris Mi <cmi@nvidia.com>
Fri, 30 Apr 2021 07:17:33 +0000 (10:17 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 20 Aug 2021 04:50:38 +0000 (21:50 -0700)
commit36fb0878c86ed7ea72f51c78ed5d960af675faec
tree98ed5d02cb3e7aa245a203c57fc62ceb6dda090f
parenta1e6587a5f2c4d2af0e384e0a37bf52da5f65558
net/mlx5e: TC, Restore tunnel info for sample offload

Currently the sample offload actions send the encapsulated packet
to software. sFlow expects tunneled packets to be decapsulated while
having the tunnel properties on the skb metadata fields.

Reuse the functions used by connection tracking to map the outer
header properties to a unique id. The next patch  will use that id
to restore the tunnel information of decapsulated packets onto the
skb.

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>
drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.h
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h