diff options
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r-- | net/core/netpoll.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 64f51eec6576..1b76eb11deb4 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <net/tcp.h> | 24 | #include <net/tcp.h> |
25 | #include <net/udp.h> | 25 | #include <net/udp.h> |
26 | #include <asm/unaligned.h> | 26 | #include <asm/unaligned.h> |
27 | #include <trace/events/napi.h> | ||
27 | 28 | ||
28 | /* | 29 | /* |
29 | * We maintain a small pool of fully-sized skbs, to make sure the | 30 | * We maintain a small pool of fully-sized skbs, to make sure the |
@@ -137,6 +138,7 @@ static int poll_one_napi(struct netpoll_info *npinfo, | |||
137 | set_bit(NAPI_STATE_NPSVC, &napi->state); | 138 | set_bit(NAPI_STATE_NPSVC, &napi->state); |
138 | 139 | ||
139 | work = napi->poll(napi, budget); | 140 | work = napi->poll(napi, budget); |
141 | trace_napi_poll(napi); | ||
140 | 142 | ||
141 | clear_bit(NAPI_STATE_NPSVC, &napi->state); | 143 | clear_bit(NAPI_STATE_NPSVC, &napi->state); |
142 | atomic_dec(&trapped); | 144 | atomic_dec(&trapped); |
@@ -300,8 +302,11 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) | |||
300 | for (tries = jiffies_to_usecs(1)/USEC_PER_POLL; | 302 | for (tries = jiffies_to_usecs(1)/USEC_PER_POLL; |
301 | tries > 0; --tries) { | 303 | tries > 0; --tries) { |
302 | if (__netif_tx_trylock(txq)) { | 304 | if (__netif_tx_trylock(txq)) { |
303 | if (!netif_tx_queue_stopped(txq)) | 305 | if (!netif_tx_queue_stopped(txq)) { |
304 | status = ops->ndo_start_xmit(skb, dev); | 306 | status = ops->ndo_start_xmit(skb, dev); |
307 | if (status == NETDEV_TX_OK) | ||
308 | txq_trans_update(txq); | ||
309 | } | ||
305 | __netif_tx_unlock(txq); | 310 | __netif_tx_unlock(txq); |
306 | 311 | ||
307 | if (status == NETDEV_TX_OK) | 312 | if (status == NETDEV_TX_OK) |
@@ -314,6 +319,11 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) | |||
314 | 319 | ||
315 | udelay(USEC_PER_POLL); | 320 | udelay(USEC_PER_POLL); |
316 | } | 321 | } |
322 | |||
323 | WARN_ONCE(!irqs_disabled(), | ||
324 | "netpoll_send_skb(): %s enabled interrupts in poll (%pF)\n", | ||
325 | dev->name, ops->ndo_start_xmit); | ||
326 | |||
317 | local_irq_restore(flags); | 327 | local_irq_restore(flags); |
318 | } | 328 | } |
319 | 329 | ||
@@ -735,7 +745,7 @@ int netpoll_setup(struct netpoll *np) | |||
735 | np->name); | 745 | np->name); |
736 | break; | 746 | break; |
737 | } | 747 | } |
738 | cond_resched(); | 748 | msleep(1); |
739 | } | 749 | } |
740 | 750 | ||
741 | /* If carrier appears to come up instantly, we don't | 751 | /* If carrier appears to come up instantly, we don't |