Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Mar 2002 23:16:57 -0800
From:      Luigi Rizzo <rizzo@icir.org>
To:        Archie Cobbs <archie@dellroad.org>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: ip_output and ENOBUFS
Message-ID:  <20020326231657.A16810@iguana.icir.org>
In-Reply-To: <200203270648.g2R6mXl39332@arch20m.dellroad.org>
References:  <20020326223947.B16450@iguana.icir.org> <200203270648.g2R6mXl39332@arch20m.dellroad.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020326231657.A16810>