Thread (288 messages) 288 messages, 13 authors, 2014-04-01

Re: [PATCH] netpoll: Don't call driver methods from interrupt context.

From: Cong Wang <hidden>
Date: 2014-03-04 04:23:06

On Mon, Mar 3, 2014 at 12:40 PM, Eric W. Biederman
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
 net/core/netpoll.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index a664f7829a6d..a1877621bf31 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -330,7 +330,7 @@ repeat:
                skb = skb_dequeue(&skb_pool);

        if (!skb) {
-               if (++count < 10) {
+               if (++count < 10 && !in_irq()) {
                        netpoll_poll_dev(np->dev);
This looks like a workaround.

Here ou are trying to avoid calling netpoll_poll_dev()
in IRQ context, but it has a side effect for netpoll_send_udp()
which could possibly return early after find_skb().

Also, netpoll_poll_dev() does more than just calling driver
poll method, I am not sure if it is safe to skip it either.

netpoll code needs to rewrite.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help