Skip to content

Commit bf8af9c

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 <[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]> (cherry picked from commit 791b408) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 2139581 commit bf8af9c

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -4424,7 +4424,7 @@ static netdev_features_t mlx5e_tunnel_features_check(struct mlx5e_priv *priv,
44244424

44254425
/* Verify if UDP port is being offloaded by HW */
44264426
if (mlx5_vxlan_lookup_port(priv->mdev->vxlan, port))
4427-
return features;
4427+
return vxlan_features_check(skb, features);
44284428

44294429
#if IS_ENABLED(CONFIG_GENEVE)
44304430
/* Support Geneve offload for default UDP port */
@@ -4450,7 +4450,6 @@ netdev_features_t mlx5e_features_check(struct sk_buff *skb,
44504450
struct mlx5e_priv *priv = netdev_priv(netdev);
44514451

44524452
features = vlan_features_check(skb, features);
4453-
features = vxlan_features_check(skb, features);
44544453

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

0 commit comments

Comments
 (0)