From owner-freebsd-net Tue Nov 21 6:44:13 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 38ADC37B479 for ; Tue, 21 Nov 2000 06:44:11 -0800 (PST) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id eALEhV510844; Tue, 21 Nov 2000 08:43:31 -0600 (CST) (envelope-from jlemon) Date: Tue, 21 Nov 2000 08:43:31 -0600 (CST) From: Jonathan Lemon Message-Id: <200011211443.eALEhV510844@prism.flugsvamp.com> To: julian@elischer.org, net@freebsd.org Subject: Re: ALTQ as standard..... X-Newsgroups: local.mail.freebsd-net In-Reply-To: Organization: Cc: Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In article you write: >I'd like to put to the networking list that we take a serious look >at making the ALTQ code from Kenjiro Cho a standard part of FreeBSD. > >I'm looking at adding some queueing methods into Netgraph >as part of some work being discussed by >phk, Archie, Brian and myself, Looking into this I note that >for the to be really effective we really want to have an >overall queueing strategy for the OS. We have at the moment, >the simplistic IFQ_ macro's, but I think that they have lived >long enough and done their duty. >I'd like to replace them (or at least supplement them) >in a way that allows us to have more comprehensive queue >support. If done correctly, (e.g the correct macro's >are added,) I think we can keep the performance degradation >to a minimum. > >MY main reason right NOW is that in some cases, Netgraph >interfaces to exisiting code using the exisiting queues, and >if I want to add such things as queue priorities, I can't >do this unless the exisiting code also upgrades. >(e.g. the netgraph ethernet hooks deliver packets into the >same queue that the normal interface methods do.) Do you have a potential replacement for the IFQ_* macros in mind? I'm updating the IF_* macros to be SMP safe, but still haven't changed the FIFO ordering. The patch is at http://www.flugsvamp.com/~jlemon/fbsd/ifq_v4.patch One change in these macros is the introduction of an IF_HANDOFF() macro that performs all the queueing, so in theory it should be easier in the future to conditionalize this to perform different types of packet queuing. However, as Kenjiro pointed out earlier, all the drivers need to be updated to perform correct dequeueing (rather than the various ad-hoc "look at head, dequeue, prepend if no space, etc". This requires significantly more code changes than updating some macro sets. As far as Netgraph goes, I note that each netgraph node seems to require two queues; fast and slow. Also, who is responsible for freeing the metadata for a packet? -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message