From: Lennert B. <bu...@gn...> - 2001-02-08 16:58:50
|
Hi all, http://www.math.leidenuniv.nl/~buytenh/umlnet/ has a (big) patch against uml 2.4.0 which rewrites the eth? device code. It also has a rough userspace daemon. What this all does is significantly enhance the uml-host interface to not do to lots of copies anymore, and it handles disconnect and reconnect properly. I have everything working now in my test setup. If I kill the daemon, the uml will try to reconnect every N seconds, and when it reconnects it takes only a few seconds to get TCP connections going again. I use a hybrid TCP/UDP approach for control/data traffic. Advantages of this approach over the standard TCP approach or my previous UDP approach is that we don't have to worry about manually retransmitting the control traffic, while we get the advantages of the stack starting to drop packets under high packet loads. This gives bounded queueing latency, which is pretty nice. My plan is to clean up some ends in the kernel code and extend the daemon to use the generic tap/tun devices (vtun.sourceforge.net/tun), and the ability to call external scripts for setting up the tap devices (address assignment, enslaving to bridge port group, etc.) If all of this doesn't make sense, please forgive me as it's very early (or late, depending on your viewpoint). cheers, Lennert PS One bug in my code was caused by an interrupt handler freeing its own interrupt. This caused the irq_user.c select loop to mess up and stomp on random data, quite a bitch to track down. I've used the following patch for this; (if the spacing's wrong it's because I cut-and-pasted it). Jeff, would you mind including this? --- linux-2.4.0/arch/um/kernel/irq_user.c.orig Thu Feb 8 01:40:29 2001 +++ linux-2.4.0/arch/um/kernel/irq_user.c Thu Feb 8 00:26:41 2001 @@ -53,10 +53,12 @@ for(irq_fd=active_fds;irq_fd != NULL;irq_fd = irq_fd->next){ if(FD_ISSET(irq_fd->fd, &fds)) irq_fd->active = 1; } +again: for(irq_fd=active_fds;irq_fd != NULL;irq_fd = irq_fd->next){ if(irq_fd->active){ irq_fd->active = 0; do_IRQ(irq_fd->irq, user_mode); + goto again; } } if(user_mode){ |