Skip to content

Commit 82395cb

Browse files
committed
net/mlx5e: Fix features validation check for tunneled UDP (non-VXLAN) packets
jira LE-1733 bugfix geneve_fixes commit 791b408 Move the vxlan_features_check() call to after we verified the packet is a tunneled VXLAN packet. Without this, tunneled UDP non-VXLAN packets (for ex. GENENVE) might wrongly not get offloaded. In some cases, it worked by chance as GENEVE header is the same size as VXLAN, but it is obviously incorrect. Fixes: e3cfc7e ("net/mlx5e: TX, Add geneve tunnel stateless offload support") Signed-off-by: Gal Pressman <gal@nvidia.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit 791b408) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent c123703 commit 82395cb

File tree

1 file changed

+1
-2
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+1
-2
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4460,7 +4460,7 @@ static netdev_features_t mlx5e_tunnel_features_check(struct mlx5e_priv *priv,
44604460

44614461
/* Verify if UDP port is being offloaded by HW */
44624462
if (mlx5_vxlan_lookup_port(priv->mdev->vxlan, port))
4463-
return features;
4463+
return vxlan_features_check(skb, features);
44644464

44654465
#if IS_ENABLED(CONFIG_GENEVE)
44664466
/* Support Geneve offload for default UDP port */
@@ -4486,7 +4486,6 @@ netdev_features_t mlx5e_features_check(struct sk_buff *skb,
44864486
struct mlx5e_priv *priv = netdev_priv(netdev);
44874487

44884488
features = vlan_features_check(skb, features);
4489-
features = vxlan_features_check(skb, features);
44904489

44914490
/* Validate if the tunneled packet is being offloaded by HW */
44924491
if (skb->encapsulation &&

0 commit comments

Comments
 (0)