* (unknown)
@ 2011-02-01 0:21 Tom Herbert
2011-02-01 0:24 ` rps_flow_table bug fix David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Tom Herbert @ 2011-02-01 0:21 UTC (permalink / raw)
To: davem, netdev
>From b6943d0caff7db23aaed20ec7abb7848281e502a Mon Sep 17 00:00:00 2001
From: Tom Herbert <therbert@google.com>
Date: Mon, 31 Jan 2011 16:12:02 -0800
Subject: [PATCH] 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>
---
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 ddd5df2..283ed85 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2666,7 +2666,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;
--
1.7.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: rps_flow_table bug fix
2011-02-01 0:21 (unknown) Tom Herbert
@ 2011-02-01 0:24 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-02-01 0:24 UTC (permalink / raw)
To: therbert; +Cc: netdev
From: Tom Herbert <therbert@google.com>
Date: Mon, 31 Jan 2011 16:21:43 -0800 (PST)
Tom, please set your email subject correctly.
> Subject: [PATCH] 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-01 0:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-01 0:21 (unknown) Tom Herbert
2011-02-01 0:24 ` rps_flow_table bug fix David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).