uml network problem fix.
PATCH 1/1 uml network problem fix.
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
arch/um/drivers/net_kern.c renamed from arch/um/drivers/net_kern.c~ +1 -0
@@ -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 [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 3 lines · [email protected] 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.
Quoted 3 lines
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 [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel