From owner-freebsd-net Tue Nov 21 13:24:49 2000 Delivered-To: freebsd-net@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id 56FA737B4CF for ; Tue, 21 Nov 2000 13:24:46 -0800 (PST) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id eALLO4926749; Tue, 21 Nov 2000 15:24:04 -0600 (CST) (envelope-from jlemon) Date: Tue, 21 Nov 2000 15:24:04 -0600 (CST) From: Jonathan Lemon Message-Id: <200011212124.eALLO4926749@prism.flugsvamp.com> To: kjc@csl.sony.co.jp, net@freebsd.org Subject: Re: ALTQ as standard..... X-Newsgroups: local.mail.freebsd-net In-Reply-To: References: Organization: Cc: Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In article 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