netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netpoll: trapping fix/cleanup
@ 2007-03-30 19:40 Sergei Shtylyov
  2007-04-04  2:30 ` Jeff Garzik
  0 siblings, 1 reply; 4+ messages in thread
From: Sergei Shtylyov @ 2007-03-30 19:40 UTC (permalink / raw)
  To: jgarzik; +Cc: netdev, shemminger, mhuth, kgdb-bugreport

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).
Make this option more sensible by only bypassing TX softirq wakeup and remove
CONFIG_NETPOLL_RX option completely since there is *no* code depending on it.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

---

 drivers/net/Kconfig       |    5 -----
 include/linux/netdevice.h |    8 +++-----
 2 files changed, 3 insertions(+), 10 deletions(-)

Index: linux-2.6/include/linux/netdevice.h
===================================================================
--- linux-2.6.orig/include/linux/netdevice.h
+++ linux-2.6/include/linux/netdevice.h
@@ -647,8 +647,10 @@ static inline void netif_start_queue(str
 static 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(stru
 
 static 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);
 }
 
Index: linux-2.6/drivers/net/Kconfig
===================================================================
--- linux-2.6.orig/drivers/net/Kconfig
+++ linux-2.6/drivers/net/Kconfig
@@ -2928,11 +2928,6 @@ endif #NETDEVICES
 config NETPOLL
 	def_bool NETCONSOLE
 
-config NETPOLL_RX
-	bool "Netpoll support for trapping incoming packets"
-	default n
-	depends on NETPOLL
-
 config NETPOLL_TRAP
 	bool "Netpoll traffic trapping"
 	default n


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] netpoll: trapping fix/cleanup
  2007-03-30 19:40 [PATCH] netpoll: trapping fix/cleanup Sergei Shtylyov
@ 2007-04-04  2:30 ` Jeff Garzik
  2007-04-04 13:03   ` Sergei Shtylyov
  2007-04-05  3:26   ` Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Jeff Garzik @ 2007-04-04  2:30 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: netdev, shemminger, mhuth, kgdb-bugreport

Sergei Shtylyov wrote:
> 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).
> Make this option more sensible by only bypassing TX softirq wakeup and remove
> CONFIG_NETPOLL_RX option completely since there is *no* code depending on it.
> 
> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

ACK but (a) DaveM not me should apply this, and (b) I would check with 
netpoll people to see what that define is there for.

	Jeff




-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] netpoll: trapping fix/cleanup
  2007-04-04  2:30 ` Jeff Garzik
@ 2007-04-04 13:03   ` Sergei Shtylyov
  2007-04-05  3:26   ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2007-04-04 13:03 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, mpm, shemminger, mhuth, kgdb-bugreport

Hello.

Jeff Garzik wrote:

>> 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).
>> Make this option more sensible by only bypassing TX softirq wakeup and 
>> remove
>> CONFIG_NETPOLL_RX option completely since there is *no* code depending 
>> on it.

>> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

> ACK but (a) DaveM not me should apply this,

    Oops, sorry. But he's only mentioned as IPv4/v6 maintainer. :-)

> and (b) I would check with 
> netpoll people to see what that define  is there for.

    Amit Kale and I were already asking about CONFIG_NETPOLL_TRAP here 1+ 
months ago and got no replies. Well I'll try to CC Matt Mackall...
    If you mean CONFIG_NETPOLL_RX, there was #ifdef's in the early version of 
netpoll support:

http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commitdiff;h=8fb9cf8ab6c0ccb1b17b32c05dc9da3cc96ac229

but later they were removed but the option left:	

http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commitdiff;h=e3c265bcf67f21d847e970e71504890f61f37824

>     Jeff

WBR, Sergei

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] netpoll: trapping fix/cleanup
  2007-04-04  2:30 ` Jeff Garzik
  2007-04-04 13:03   ` Sergei Shtylyov
@ 2007-04-05  3:26   ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2007-04-05  3:26 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, shemminger, mhuth, kgdb-bugreport

On Tue, Apr 03, 2007 at 10:30:46PM -0400, Jeff Garzik wrote:
> Sergei Shtylyov wrote:
> > 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).
> > Make this option more sensible by only bypassing TX softirq wakeup and remove
> > CONFIG_NETPOLL_RX option completely since there is *no* code depending on it.
> > 
> > Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> 
> ACK but (a) DaveM not me should apply this, and (b) I would check with 
> netpoll people to see what that define is there for.

In terms of KGDB usage, I know Sergei has been trying to track down and
fix some issues (/make it more reliable) so if this does impact us I
know he'll be sending something along.  ACK.

-- 
Tom Rini

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-04-05  3:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-30 19:40 [PATCH] netpoll: trapping fix/cleanup Sergei Shtylyov
2007-04-04  2:30 ` Jeff Garzik
2007-04-04 13:03   ` Sergei Shtylyov
2007-04-05  3:26   ` Tom Rini

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).