netpoll: fix TX queue overflow in trapped mode
Subsystems (2)
PATCH 1/1 netpoll: fix TX queue overflow in trapped mode
CONFIG_NETPOLL_TRAP causes the TX queue controls to be completely bypassed in the netpoll's "trapped" mode which easily causes overflows in the drivers with short TX queues (most notably, in 8139too with its 4-deep queue). So, make this option more sensible by making it only bypass the TX softirq wakeup.
---
Split this part form the initial patch as request by Matt Mackall.
include/linux/netdevice.h | 8 +++----- 2 files changed, 3 insertions(+), 10 deletions(-)
include/linux/netdevice.h +3 -5
@@ -647,8 +647,10 @@ static inline void netif_start_queue(strstatic inline void netif_wake_queue (struct net_device *dev) {#ifdef CONFIG_NETPOLL_TRAP -if (netpoll_trap ()) +if (netpoll_trap ()) { +clear_bit (__LINK_STATE_XOFF, &dev->state);return ; + }#endif if (test_and_clear_bit (__LINK_STATE_XOFF, &dev->state))__netif_schedule (dev);
@@ -656,10 +658,6 @@ static inline void netif_wake_queue(strustatic inline void netif_stop_queue (struct net_device *dev) { -#ifdef CONFIG_NETPOLL_TRAP -if (netpoll_trap ()) -return ; -#endif set_bit (__LINK_STATE_XOFF, &dev->state); }
Quoted 5 lines · you
CONFIG_NETPOLL_TRAPcauses the TX queue controls to be completely bypassed in the netpoll's "trapped" mode which easily causes overflows in the drivers with short TX queues (most notably, in 8139too with its 4-deep queue). So, make this option more sensible by making it only bypass the TX softirq wakeup.
Dammit! Finally forgot to add acks earned so far:
Quoted 1 line
Signed-off-by Sergei Shtylyov <[email protected]>
Quoted 32 lines
---
Split this part form the initial patch as request by Matt Mackall.include/linux/netdevice.h | 8 +++----- 2 files changed, 3 insertions(+), 10 deletions(-)Index:
linux-2.6/include/linux/netdevice.h
===================================================================include/linux/netdevice.h +3
-5@@ -647,8 +647,10 @@ static inline void netif_start_queue(strstatic inline void netif_wake_queue (struct net_device *dev) {#ifdef CONFIG_NETPOLL_TRAP -if (netpoll_trap ()) +if (netpoll_trap ()) { +clear_bit (__LINK_STATE_XOFF, &dev->state);return ; + }#endif if (test_and_clear_bit (__LINK_STATE_XOFF, &dev->state))__netif_schedule (dev);@@ -656,10 +658,6 @@ static inline void netif_wake_queue(strustatic inline void netif_stop_queue (struct net_device *dev) { -#ifdef CONFIG_NETPOLL_TRAP -if (netpoll_trap ()) -return ; -#endif set_bit (__LINK_STATE_XOFF, &dev->state); }
Sergei Shtylyov
Acked-by Tom RiniQuoted 6 lines · On Saturday 28 April 2007 22:52, I wrote:
Quoted 5 lines
CONFIG_NETPOLL_TRAPcauses the TX queue controls to be completely bypassed in the netpoll's "trapped" mode which easily causes overflows in the drivers with short TX queues (most notably, in 8139too with its 4-deep queue). So, make this option more sensible by making it only bypass the TX softirq wakeup.Dammit! Finally forgot to add acks earned so far:
Oh, and there was even another one:
Quoted 3 lines
Quoted 1 line
Signed-off-by Sergei Shtylyov <[email protected]>Acked-by Jeff Garzik <[email protected]>
Quoted 34 lines
Acked-by Matt Mackall <[email protected]>Quoted 32 lines
---
Split this part form the initial patch as request by Matt Mackall.include/linux/netdevice.h | 8 +++----- 2 files changed, 3 insertions(+), 10 deletions(-)Index:
linux-2.6/include/linux/netdevice.h
===================================================================include/linux/netdevice.h +3
-5@@ -647,8 +647,10 @@ static inline void netif_start_queue(strstatic inline void netif_wake_queue (struct net_device *dev) {#ifdef CONFIG_NETPOLL_TRAP -if (netpoll_trap ()) +if (netpoll_trap ()) { +clear_bit (__LINK_STATE_XOFF, &dev->state);return ; + }#endif if (test_and_clear_bit (__LINK_STATE_XOFF, &dev->state))__netif_schedule (dev);@@ -656,10 +658,6 @@ static inline void netif_wake_queue(strustatic inline void netif_stop_queue (struct net_device *dev) { -#ifdef CONFIG_NETPOLL_TRAP -if (netpoll_trap ()) -return ; -#endif set_bit (__LINK_STATE_XOFF, &dev->state); }
From: Sergei Shtylyov <[email protected]>
Date: Sun, 29 Apr 2007 00:25:41 +0400
Quoted 7 lines · On Saturday 28 April 2007 22:52, I wrote:
Quoted 6 lines
Quoted 6 lines
CONFIG_NETPOLL_TRAPcauses the TX queue controls to be completely bypassed in the netpoll's "trapped" mode which easily causes overflows in the drivers with short TX queues (most notably, in 8139too with its 4-deep queue). So, make this option more sensible by making it only bypass the TX softirq wakeup.
Quoted 9 lines
Quoted 1 line
Dammit! Finally forgot to add acks earned so far:
Oh, and there was even another one:
Quoted 3 lines
Quoted 1 line
Signed-off-by Sergei Shtylyov <[email protected]>Acked-by Jeff Garzik <[email protected]>Acked-by Tom Rini <[email protected]>Quoted 1 line
Acked-by Matt Mackall <[email protected]>
Applied, I'll push this to -stable too.