From owner-freebsd-net@FreeBSD.ORG Sun Jul 31 13:23:52 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F230016A41F; Sun, 31 Jul 2005 13:23:51 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4093E43D46; Sun, 31 Jul 2005 13:23:45 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from midget.dons.net.au (ppp217-188.lns1.adl2.internode.on.net [203.122.217.188]) by smtp1.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id j6VDNZJ2084806; Sun, 31 Jul 2005 22:53:35 +0930 (CST) Received: from inchoate.dons.net.au (inchoate.dons.net.au [10.0.2.105]) (authenticated bits=0) by midget.dons.net.au (8.13.4/8.13.3) with ESMTP id j6VDNTxd001293 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sun, 31 Jul 2005 22:53:34 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: Julian Elischer Date: Sun, 31 Jul 2005 22:53:28 +0930 User-Agent: KMail/1.8.1 References: <200507290834.10268.doconnor@gsoft.com.au> <200507310056.21857.doconnor@gsoft.com.au> <42EBD738.2010105@elischer.org> In-Reply-To: <42EBD738.2010105@elischer.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1629617.39ku3ImXzu"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200507312253.29038.doconnor@gsoft.com.au> X-Spam-Score: 0 () X-Scanned-By: MIMEDefang 2.52 on 10.0.2.7 Cc: freebsd-net@freebsd.org Subject: Re: AltQ + ng_iface X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2005 13:23:52 -0000 --nextPart1629617.39ku3ImXzu Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 31 July 2005 05:08, Julian Elischer wrote: > mbuf tags have "families" so that differetn modules can use > the same ID numbers and not clash. > here is a netgraph family for tags, using the netgraph cookies. > It's been a while since I looked at it but if you are using mbuf > tags in netgraph you should check out the netgraph tag facilities. I see the cookies for ksocket, lmi and ipfw, but I don't understand how the= =20 magic numbers were chosen.. gettimeofday() ? There is NGM_GENERIC_COOKIE.. should I use that and add an entry to=20 ng_message.h? > If you queue data to be send over a hook you must have the data hold a > reference on the hook to ensure that the hook is not removed while your > packet is in teh queue. Similarly either the packet holds a reference > on teh node as well, or the node must lock it's queue and remove all > packets when shut down. >=20 > I see that you don't actually decid eon what hook will be used until late= r=20 > so teh reference to teh hook needn't be done, but you haven't added any c= ode=20 > to either hold a reference on the node, or to clean the queue on shutdown. > (or is that done automatically by some iface base code that is called > during shutdown). I think cleaning the queue is done by the generic interface code - I couldn= 't=20 find anything in other drivers that cleans up the queue on unload (for=20 example). > The calling code must always have a reference on the node to ensure that > it is not removed while it is running in it. This is sometimes > done automatically. This is why there is an ng_callout facility to ensure > that the locking andreferences are done automatically and correctly. OK, I'll look into that. > I would also want to have the altq optional.. > in other words I'd want a control message to ng_iface that could make it > act as before. I believe that if ALTQ is not enabled then the IFQ_HANDOFF/DEQUEUE macros d= o=20 nothing special so ng_iface should act as before albeit slightly more slowl= y=20 (but not any different to just about every other network interface) =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart1629617.39ku3ImXzu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQBC7NDR5ZPcIHs/zowRAtLYAJ0aqhnHBQ4YKNTjzmWfexllJ8fc4wCfbn0m dgYSrYO6ftFbisAFSmetGpQ= =RkTv -----END PGP SIGNATURE----- --nextPart1629617.39ku3ImXzu--