* [PATCH] rps: fixed missed rps_unlock
@ 2010-04-05 21:30 Tom Herbert
2010-04-05 21:35 ` Eric Dumazet
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Tom Herbert @ 2010-04-05 21:30 UTC (permalink / raw)
To: davem, netdev
Fix spin_unlock_irq which needs to be rps_unlock.
Signed-off-by: Tom Herbert <therbert@google.com>
---
diff --git a/net/core/dev.c b/net/core/dev.c
index 2a9b7dd..74f77ca 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3120,7 +3120,7 @@ static int process_backlog(struct napi_struct *napi, int quota)
skb = __skb_dequeue(&queue->input_pkt_queue);
if (!skb) {
__napi_complete(napi);
- spin_unlock_irq(&queue->input_pkt_queue.lock);
+ rps_unlock(queue);
break;
}
rps_unlock(queue);
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] rps: fixed missed rps_unlock
2010-04-05 21:30 [PATCH] rps: fixed missed rps_unlock Tom Herbert
@ 2010-04-05 21:35 ` Eric Dumazet
2010-04-05 21:40 ` Tom Herbert
2010-04-05 21:37 ` David Miller
2010-04-05 22:23 ` Changli Gao
2 siblings, 1 reply; 7+ messages in thread
From: Eric Dumazet @ 2010-04-05 21:35 UTC (permalink / raw)
To: Tom Herbert; +Cc: davem, netdev
Le lundi 05 avril 2010 à 14:30 -0700, Tom Herbert a écrit :
> Fix spin_unlock_irq which needs to be rps_unlock.
>
> Signed-off-by: Tom Herbert <therbert@google.com>
> ---
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 2a9b7dd..74f77ca 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -3120,7 +3120,7 @@ static int process_backlog(struct napi_struct *napi, int quota)
> skb = __skb_dequeue(&queue->input_pkt_queue);
> if (!skb) {
> __napi_complete(napi);
> - spin_unlock_irq(&queue->input_pkt_queue.lock);
> + rps_unlock(queue);
> break;
> }
> rps_unlock(queue);
> --
Yes, and rps_lock()/rps_unlock() are not well chosen either, but no
clever names come to my mind right now.
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rps: fixed missed rps_unlock
2010-04-05 21:30 [PATCH] rps: fixed missed rps_unlock Tom Herbert
2010-04-05 21:35 ` Eric Dumazet
@ 2010-04-05 21:37 ` David Miller
2010-04-05 22:23 ` Changli Gao
2 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2010-04-05 21:37 UTC (permalink / raw)
To: therbert; +Cc: netdev
From: Tom Herbert <therbert@google.com>
Date: Mon, 5 Apr 2010 14:30:58 -0700 (PDT)
> Fix spin_unlock_irq which needs to be rps_unlock.
>
> Signed-off-by: Tom Herbert <therbert@google.com>
Applied, thanks Tom.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rps: fixed missed rps_unlock
2010-04-05 21:35 ` Eric Dumazet
@ 2010-04-05 21:40 ` Tom Herbert
0 siblings, 0 replies; 7+ messages in thread
From: Tom Herbert @ 2010-04-05 21:40 UTC (permalink / raw)
To: Eric Dumazet; +Cc: davem, netdev
-
>
> Yes, and rps_lock()/rps_unlock() are not well chosen either, but no
> clever names come to my mind right now.
>
input_queue_lock/input_queue_unlock ?
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rps: fixed missed rps_unlock
2010-04-05 21:30 [PATCH] rps: fixed missed rps_unlock Tom Herbert
2010-04-05 21:35 ` Eric Dumazet
2010-04-05 21:37 ` David Miller
@ 2010-04-05 22:23 ` Changli Gao
2010-04-05 22:41 ` [PATCH net-next-2.6] net: Add a missing local_irq_enable() Eric Dumazet
2 siblings, 1 reply; 7+ messages in thread
From: Changli Gao @ 2010-04-05 22:23 UTC (permalink / raw)
To: Tom Herbert; +Cc: davem, netdev
On Tue, Apr 6, 2010 at 5:30 AM, Tom Herbert <therbert@google.com> wrote:
> Fix spin_unlock_irq which needs to be rps_unlock.
>
> Signed-off-by: Tom Herbert <therbert@google.com>
> ---
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 2a9b7dd..74f77ca 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -3120,7 +3120,7 @@ static int process_backlog(struct napi_struct *napi, int quota)
> skb = __skb_dequeue(&queue->input_pkt_queue);
> if (!skb) {
> __napi_complete(napi);
> - spin_unlock_irq(&queue->input_pkt_queue.lock);
> + rps_unlock(queue);
> break;
> }
> rps_unlock(queue);
It seems that irq isn't enabled when breaking the loop. Please add
local_irq_enable();
after rps_unlock(queue);
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next-2.6] net: Add a missing local_irq_enable()
2010-04-05 22:23 ` Changli Gao
@ 2010-04-05 22:41 ` Eric Dumazet
2010-04-05 22:42 ` David Miller
0 siblings, 1 reply; 7+ messages in thread
From: Eric Dumazet @ 2010-04-05 22:41 UTC (permalink / raw)
To: Changli Gao; +Cc: Tom Herbert, davem, netdev
Le mardi 06 avril 2010 à 06:23 +0800, Changli Gao a écrit :
> It seems that irq isn't enabled when breaking the loop. Please add
> local_irq_enable();
> after rps_unlock(queue);
Gah.. you are right, following patch needed, since David already applied
Tom's patch.
[PATCH net-next-2.6] net: Add a missing local_irq_enable()
As noticed by Changli Gao, we must call local_irq_enable() after
rps_unlock()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
diff --git a/net/core/dev.c b/net/core/dev.c
index 74f77ca..b98ddc6 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3121,6 +3121,7 @@ static int process_backlog(struct napi_struct *napi, int quota)
if (!skb) {
__napi_complete(napi);
rps_unlock(queue);
+ local_irq_enable();
break;
}
rps_unlock(queue);
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-next-2.6] net: Add a missing local_irq_enable()
2010-04-05 22:41 ` [PATCH net-next-2.6] net: Add a missing local_irq_enable() Eric Dumazet
@ 2010-04-05 22:42 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2010-04-05 22:42 UTC (permalink / raw)
To: eric.dumazet; +Cc: xiaosuo, therbert, netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 06 Apr 2010 00:41:47 +0200
> Le mardi 06 avril 2010 à 06:23 +0800, Changli Gao a écrit :
>
>> It seems that irq isn't enabled when breaking the loop. Please add
>> local_irq_enable();
>> after rps_unlock(queue);
>
> Gah.. you are right, following patch needed, since David already applied
> Tom's patch.
>
> [PATCH net-next-2.6] net: Add a missing local_irq_enable()
>
> As noticed by Changli Gao, we must call local_irq_enable() after
> rps_unlock()
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, hope it's fully resolved now :-)
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-04-05 22:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-05 21:30 [PATCH] rps: fixed missed rps_unlock Tom Herbert
2010-04-05 21:35 ` Eric Dumazet
2010-04-05 21:40 ` Tom Herbert
2010-04-05 21:37 ` David Miller
2010-04-05 22:23 ` Changli Gao
2010-04-05 22:41 ` [PATCH net-next-2.6] net: Add a missing local_irq_enable() Eric Dumazet
2010-04-05 22:42 ` 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).