aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2011-01-31 19:23:42 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-31 19:23:42 -0500
commit8587523640441a9ff2564ebc6efeb39497ad6709 (patch)
treec42ae4809263f9db59ee0721eb03e1b9b18fb0b1 /net
parentcc09b5f6466528867b280f6eb4077311aa099588 (diff)
net: Check rps_flow_table when RPS map length is 1
In get_rps_cpu, add check that the rps_flow_table for the device is NULL when trying to take fast path when RPS map length is one. Without this, RFS is effectively disabled if map length is one which is not correct. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-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 93e44dbf679..4c907895876 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2563,7 +2563,8 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb,
2563 2563
2564 map = rcu_dereference(rxqueue->rps_map); 2564 map = rcu_dereference(rxqueue->rps_map);
2565 if (map) { 2565 if (map) {
2566 if (map->len == 1) { 2566 if (map->len == 1 &&
2567 !rcu_dereference_raw(rxqueue->rps_flow_table)) {
2567 tcpu = map->cpus[0]; 2568 tcpu = map->cpus[0];
2568 if (cpu_online(tcpu)) 2569 if (cpu_online(tcpu))
2569 cpu = tcpu; 2570 cpu = tcpu;