From: Ben Hutchings Date: Tue, 15 Feb 2011 20:32:04 +0000 (+0000) Subject: net: RPS: Make hardware-accelerated RFS conditional on NETIF_F_NTUPLE X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=69a19ee60d5d5adc0addbdffd254f83b60660a07;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net: RPS: Make hardware-accelerated RFS conditional on NETIF_F_NTUPLE For testing and debugging purposes it is useful to be able to disable hardware acceleration of RFS without disabling RFS altogether. Since this is a similar feature to 'n-tuple' flow steering through the ethtool API, test the same feature flag that controls that. Signed-off-by: Ben Hutchings --- diff --git a/net/core/dev.c b/net/core/dev.c index 30c71f9b0419..54aaca69a029 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2607,7 +2607,8 @@ set_rps_cpu(struct net_device *dev, struct sk_buff *skb, int rc; /* Should we steer this flow to a different hardware queue? */ - if (!skb_rx_queue_recorded(skb) || !dev->rx_cpu_rmap) + if (!skb_rx_queue_recorded(skb) || !dev->rx_cpu_rmap || + !(dev->features & NETIF_F_NTUPLE)) goto out; rxq_index = cpu_rmap_lookup_index(dev->rx_cpu_rmap, next_cpu); if (rxq_index == skb_get_rx_queue(skb))