Skip to content

Commit 791b408

Browse files
gal-pressmandavem330
authored andcommitted
net/mlx5e: Fix features validation check for tunneled UDP (non-VXLAN) packets
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 <[email protected]> Reviewed-by: Dragos Tatulea <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Reviewed-by: Wojciech Drewek <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c6ae073 commit 791b408

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
@@ -4875,7 +4875,7 @@ static netdev_features_t mlx5e_tunnel_features_check(struct mlx5e_priv *priv,
48754875

48764876
/* Verify if UDP port is being offloaded by HW */
48774877
if (mlx5_vxlan_lookup_port(priv->mdev->vxlan, port))
4878-
return features;
4878+
return vxlan_features_check(skb, features);
48794879

48804880
#if IS_ENABLED(CONFIG_GENEVE)
48814881
/* Support Geneve offload for default UDP port */
@@ -4901,7 +4901,6 @@ netdev_features_t mlx5e_features_check(struct sk_buff *skb,
49014901
struct mlx5e_priv *priv = netdev_priv(netdev);
49024902

49034903
features = vlan_features_check(skb, features);
4904-
features = vxlan_features_check(skb, features);
49054904

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

0 commit comments

Comments
 (0)