public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* netpoll trapped question
@ 2004-08-31 17:10 Jeff Moyer
  2004-09-06 21:35 ` Matt Mackall
  0 siblings, 1 reply; 11+ messages in thread
From: Jeff Moyer @ 2004-08-31 17:10 UTC (permalink / raw)
  To: mpm; +Cc: linux-kernel

Hi, Matt,

This part of the netpoll trapped logic seems suspect to me, from
include/linux/netdevice.h:

static inline void netif_wake_queue(struct net_device *dev)
{
#ifdef CONFIG_NETPOLL_TRAP
	if (netpoll_trap())
		return;
#endif
	if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state))
		__netif_schedule(dev);
}

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);
}

This looks buggy.  Network drivers are now not able to stop the queue when
they run out of Tx descriptors.  I think the __netif_schedule is okay to do
in the context of netpoll, and certainly a set_bit is okay.  Why are these
hooks in place?  I've tested alt-sysrq-t over netconsole and also netdump
with these #ifdef's removed, and things work correctly.  Compare this with
alt-sysrq-t hanging the system with these tests in place.  If I run netdump
with this logic still in place, I get the following messages from the tg3
driver:

  eth0: BUG! Tx Ring full when queue awake!

Shall I send a patch, or have I missed something?

-Jeff

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

end of thread, other threads:[~2004-09-08 11:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-31 17:10 netpoll trapped question Jeff Moyer
2004-09-06 21:35 ` Matt Mackall
2004-09-07 16:33   ` Jeff Moyer
2004-09-07 16:50     ` Matt Mackall
2004-09-07 16:53       ` Jeff Moyer
2004-09-07 16:59         ` Matt Mackall
2004-09-07 17:10           ` Jeff Moyer
2004-09-07 17:22             ` Matt Mackall
2004-09-08  8:22             ` Herbert Xu
2004-09-08  8:34               ` Herbert Xu
2004-09-08 11:54                 ` Jeff Moyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox