Date: Sat, 30 Jul 2005 12:38:32 -0700 From: Julian Elischer <julian@elischer.org> To: "Daniel O'Connor" <doconnor@gsoft.com.au> Cc: freebsd-net@freebsd.org Subject: Re: AltQ + ng_iface Message-ID: <42EBD738.2010105@elischer.org> In-Reply-To: <200507310056.21857.doconnor@gsoft.com.au> References: <200507290834.10268.doconnor@gsoft.com.au> <42E99CFD.6070803@elischer.org> <200507301900.32660.doconnor@gsoft.com.au> <200507310056.21857.doconnor@gsoft.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Daniel O'Connor wrote: > On Saturday 30 July 2005 19:00, Daniel O'Connor wrote: > >>I'll try my hand at the ng_iface ALTQ patch. > > > Here's what I have so far.. > > http://www.dons.net.au/~darius/ng_iface-altq.diff > > Haven't done much testing yet though. small comments so far.. 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. 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. I see that you don't actually decid eon what hook will be used until later so teh reference to teh hook needn't be done, but you haven't added any code 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). 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. 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. >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42EBD738.2010105>