From: Gerd Knorr <kraxel@bytesex.org>
To: Jeff Dike <jdike@addtoit.com>,
uml devel <user-mode-linux-devel@lists.sourceforge.net>
Subject: [uml-devel] [patch] uml network problem fix.
Date: Thu, 13 May 2004 18:24:40 +0200 [thread overview]
Message-ID: <20040513162440.GA28107@bytesex.org> (raw)
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
next reply other threads:[~2004-05-13 16:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-13 16:24 Gerd Knorr [this message]
2004-05-20 0:54 ` [uml-devel] [patch] uml network problem fix Jeff Dike
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040513162440.GA28107@bytesex.org \
--to=kraxel@bytesex.org \
--cc=jdike@addtoit.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.