On Tue, Mar 26, 2002 at 10:48:33PM -0800, Archie Cobbs wrote: > Luigi Rizzo writes: > > As a matter of fact, i even implemented a similar thing in dummynet, > > and if device drivers call if_tx_rdy() when they complete a > > transmission, then the tx interrupt can be used to clock > > packets out of the dummynet pipes. A patch for if_tun.c is below, > > So if_tx_rdy() sounds like my if_get_next().. guess you already did that :-)
yes, but it does not solve the problem of the original poster who wanted to block/wakeup processes getting enobufs. Signal just do not propagate beyond the pipe they are sent to. > Is if_tx_rdy() something that can be used generally or does it only > work with dummynet ? well, the function is dummynet-specific, but I would certainly like a generic callback list to be implemented in ifnet which is invoked on tx_empty events. So Ckernel modules could hook their own callback to the list and get notified of events when they occur. The problem as usual is that you have to touch every single device driver... Fortunately we can leave the ifnet structure unmodified because i just discovered there is an ifindex2ifnet array which is managed and can be extended to point to additional ifnet state that does not fit in the immutable one... cheers luigi To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-net" in the body of the message