Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Nov 2000 15:24:04 -0600 (CST)
From:      Jonathan Lemon <jlemon@flugsvamp.com>
To:        kjc@csl.sony.co.jp, net@freebsd.org
Subject:   Re: ALTQ as standard.....
Message-ID:  <200011212124.eALLO4926749@prism.flugsvamp.com>
In-Reply-To: <local.mail.freebsd-net/20001122025959Z.kjc@csl.sony.co.jp>
References:  <local.mail.freebsd-net/3A1A74D4.CF5AEF4F@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <local.mail.freebsd-net/20001122025959Z.kjc@csl.sony.co.jp> you write:
>In ALTQ, the following 4 operations are used.
> - ENQUEUE
>	enqueues a packet to the queue.  ENQUEUE also takes care of
>	packet dropping.  if the arriving packet is dropped, the mbuf
>	is freed and an error (ENOBUFS) is returned.
> - DEQUEUE
>	dequeues a packet from the queue.
> - POLL
>	returns the next packet without removing the packet from the
>	queue.
>	if DEQUEUE immediately follows POLL, the same packet is
>	returned.  (locking will be needed for SMP.)
> - PURGE
>	discards all the packets in the queue.  (this operation is
>	needed for non-work conserving schedulers which cannot get
>	emptied by a dequeue-loop.)

This is roughly what I have now (but with slightly different names).
Note that freeing the mbuf is a little problematic for netgraph, since
you have to free the mbuf + metadata both.

I also haven't addressed the (poll/dequeue vs dequeue/prepend) yet,
I'll look at that after the first round of updates is complete.
--
Jonathan


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?200011212124.eALLO4926749>