* [uml-devel] [patch] uml network problem fix.
@ 2004-05-13 16:24 Gerd Knorr
2004-05-20 0:54 ` Jeff Dike
0 siblings, 1 reply; 2+ messages in thread
From: Gerd Knorr @ 2004-05-13 16:24 UTC (permalink / raw)
To: Jeff Dike, uml devel
Hi,
I think I've found a bug in either the uml network driver or the uml
sigio/irq handling. Not sure where exactly the bug is. Here is the
problem:
* the uml machine is setup with networking via switch daemon.
* uml machine is booted, the network driver connects to the switch
daemon and initializes the unix/dgram socket.
* the switch daemon forwards packages to the uml machine (broadcasts,
when running in "-hub" mode also other stuff), whereas the uml
machine ignores these due to the interface still being down.
* the unix socket fifo fills up, the switch daemon starts dropping
packets due to that.
* the uml machine tries to setup the network interface via "dhcpcd
eth0", but failes because it doesn't receive any packets.
Further investigations shows that the uml network driver irq handler
isn't called for some reason. Maybe because the socket fifo already
is full and only _new_ data arriving is signaled via SIGIO?
I've cured the issue with the one-liner patch below, which simply
receives any pending packets after up'ing the interface. I'm not
sure if it is the right way to fix that through.
Comments?
Gerd
--- a/arch/um/drivers/net_kern.c~ 2004-05-13 17:21:28.604869781 +0200
+++ b/arch/um/drivers/net_kern.c 2004-05-13 17:39:12.386221066 +0200
@@ -131,6 +131,7 @@
list_add(&lp->list, &opened);
spin_unlock(&opened_lock);
MOD_INC_USE_COUNT;
+ while((err = uml_net_rx(dev)) > 0) ; /* clear buffer */
out:
spin_unlock(&lp->lock);
return(err);
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [uml-devel] [patch] uml network problem fix.
2004-05-13 16:24 [uml-devel] [patch] uml network problem fix Gerd Knorr
@ 2004-05-20 0:54 ` Jeff Dike
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2004-05-20 0:54 UTC (permalink / raw)
To: Gerd Knorr; +Cc: uml devel
kraxel@bytesex.org said:
> Further investigations shows that the uml network driver irq handler
> isn't called for some reason. Maybe because the socket fifo already
> is full and only _new_ data arriving is signaled via SIGIO?
Hmmm. There's no atomic open-and-setup-sigio operation, so there's an
inherent race there.
> I've cured the issue with the one-liner patch below, which simply
> receives any pending packets after up'ing the interface. I'm not sure
> if it is the right way to fix that through.
It seems reasonable at first glance.
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-05-20 0:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-13 16:24 [uml-devel] [patch] uml network problem fix Gerd Knorr
2004-05-20 0:54 ` Jeff Dike
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.