diff options
author | Tom Herbert <therbert@google.com> | 2011-01-31 16:23:42 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-31 16:23:42 -0800 |
commit | 8587523640441a9ff2564ebc6efeb39497ad6709 (patch) | |
tree | c42ae4809263f9db59ee0721eb03e1b9b18fb0b1 /net | |
parent | cc09b5f6466528867b280f6eb4077311aa099588 (diff) | |
download | op-kernel-dev-8587523640441a9ff2564ebc6efeb39497ad6709.zip op-kernel-dev-8587523640441a9ff2564ebc6efeb39497ad6709.tar.gz |
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 93e44db..4c90789 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, map = rcu_dereference(rxqueue->rps_map); if (map) { - if (map->len == 1) { + if (map->len == 1 && + !rcu_dereference_raw(rxqueue->rps_flow_table)) { tcpu = map->cpus[0]; if (cpu_online(tcpu)) cpu = tcpu; |