]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Check tunnel offload is required before setting SWP
authorMoshe Shemesh <moshe@nvidia.com>
Tue, 26 Jan 2021 14:46:11 +0000 (16:46 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 12 Feb 2021 02:50:16 +0000 (18:50 -0800)
commit11e115de30fbbf5ab5fe8b8eff9a14b1d2df4277
treeb151ab0eeb231661ce5e447e31da5c9166eb2dc8
parentd851e6aad647ff8d04ffa71882ba63fa0d6e7745
net/mlx5e: Check tunnel offload is required before setting SWP

Check that tunnel offload is required before setting Software Parser
offsets to get Geneve HW offload. In case of Geneve packet we check HW
offload support of SWP in mlx5e_tunnel_features_check() and set features
accordingly, this should be reflected in skb offload requested by the
kernel and we should add the Software Parser offsets only if requested.
Otherwise, in case HW doesn't support SWP for Geneve, data path will
mistakenly try to offload Geneve SKBs with skb->encapsulation set,
regardless of whether offload was requested or not on this specific SKB.

Fixes: 0c526724a824 ("net/mlx5e: TX, Add geneve tunnel stateless offload support")
Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h