From: Jeff D. <jd...@ka...> - 2000-04-30 04:24:30
|
jl...@mi... said: > I notice that you have a request_irq() implementation but I couldn't > find a do_IRQ() or equivalent. Do you have equivalent or do you by > pass the interrupt scheme completly? I don't have device interrupts at all yet. Everything is driven off the timer. The way input works is that the initial uml thread becomes the input handler for the whole kernel. Anything that wants to listen to a file descriptor opens it and pass it plus a callback procedure to input_new_fd. That procedure will be called whenever there's input on the fd. When the fd is emptied, the callback calls enable_fd to have monitoring of it resumed. When it is closed, call input_forget_fd. Look at arch/um/drivers/umn_user.c to see this in action. The irq code that is there is a historical artifact from when I was first getting the kernel to link. I added the entry point, then looked at the i386 implementation, saw that there was no funky assembly or anything in it, and copied it in. It's not used and I just haven't got rid of it yet. > I've attached the diff (vs pre5, but it works on the new pre6 as well) > and the code for the (very) simple net program. I didn't get anything in the attachment... gbr...@mi... said: > this could probably be enhanced a bit adding ethertap support to > uml-net so it can potentially communicate with the host os, this was > an idea i'd had before but hadn't thought of it possibly communicating > with multiple uml's on the same machine. I think there are basically two kinds of possible nets here - ones that communicate with the host os and ones that just communicate between umls. I don't see any reason that they should be combined. I'm happy with a point-to-point driver that connects to the host and a ethernet-like driver that lets a bunch of umls talk to each other. The choice of how to talk to the host is one of permissions as far as I know. The current driver uses a slip device. I looked at using ethertap a while back, but it seems to have the same requirements as slip. You need to be root or have CAP_NET_ADMIN to configure one. jl...@mi... said: > I have plans to use either ethertap or an AF_PACKET socket that can > listen too and send packets out a specific physical interface. Unless you can think of a good reason that you need to add host networking to your driver, I would just leave it as a virtual network driver... Jeff |