aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2011-02-15 15:32:04 -0500
committerBen Hutchings <bhutchings@solarflare.com>2011-02-15 15:36:11 -0500
commit69a19ee60d5d5adc0addbdffd254f83b60660a07 (patch)
tree1ddb2f75bb69dde71bf9d13dc04d2dfbd71e12d7 /net/core/dev.c
parent94b274bf5fba6c75b922c8a23ad4b5639a168780 (diff)
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 <bhutchings@solarflare.com>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c3
1 files changed, 2 insertions, 1 deletions
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,
2607 int rc; 2607 int rc;
2608 2608
2609 /* Should we steer this flow to a different hardware queue? */ 2609 /* Should we steer this flow to a different hardware queue? */
2610 if (!skb_rx_queue_recorded(skb) || !dev->rx_cpu_rmap) 2610 if (!skb_rx_queue_recorded(skb) || !dev->rx_cpu_rmap ||
2611 !(dev->features & NETIF_F_NTUPLE))
2611 goto out; 2612 goto out;
2612 rxq_index = cpu_rmap_lookup_index(dev->rx_cpu_rmap, next_cpu); 2613 rxq_index = cpu_rmap_lookup_index(dev->rx_cpu_rmap, next_cpu);
2613 if (rxq_index == skb_get_rx_queue(skb)) 2614 if (rxq_index == skb_get_rx_queue(skb))