net/mlx5e: Don't allow aRFS for encapsulated packets
authorEran Ben Elisha <eranbe@mellanox.com>
Sun, 8 Jul 2018 11:52:12 +0000 (14:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 28 Jul 2018 05:49:11 +0000 (07:49 +0200)
[ Upstream commit d2e1c57bcf9a07cbb67f30ecf238f298799bce1c ]

Driver is yet to support aRFS for encapsulated packets, return early
error in such case.

Fixes: 18c908e477dc ("net/mlx5e: Add accelerated RFS support")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c

index a8cb38789774c754bebb2f2f451a3379b6363eb9..885f47e9ae93493c5f704661e2c6a4857430c0b6 100644 (file)
@@ -715,6 +715,9 @@ int mlx5e_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
            skb->protocol != htons(ETH_P_IPV6))
                return -EPROTONOSUPPORT;
 
+       if (skb->encapsulation)
+               return -EPROTONOSUPPORT;
+
        arfs_t = arfs_get_table(arfs, arfs_get_ip_proto(skb), skb->protocol);
        if (!arfs_t)
                return -EPROTONOSUPPORT;