Skip to content

Commit

Permalink
net/mlx4_en: Don't allow aRFS for encapsulated packets
Browse files Browse the repository at this point in the history
[ Upstream commit fdbccea ]

Driver doesn't support aRFS for encapsulated packets, return early error
in such a case.

Fixes: 1eb8c69 ("net/mlx4_en: Add accelerated RFS support")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Aya Levin authored and gregkh committed Sep 30, 2021
1 parent 6909a55 commit d0a3a06
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/mellanox/mlx4/en_netdev.c
Expand Up @@ -372,6 +372,9 @@ mlx4_en_filter_rfs(struct net_device *net_dev, const struct sk_buff *skb,
int nhoff = skb_network_offset(skb);
int ret = 0;

if (skb->encapsulation)
return -EPROTONOSUPPORT;

if (skb->protocol != htons(ETH_P_IP))
return -EPROTONOSUPPORT;

Expand Down

0 comments on commit d0a3a06

Please sign in to comment.