Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Jul 2005 22:53:28 +0930
From:      "Daniel O'Connor" <doconnor@gsoft.com.au>
To:        Julian Elischer <julian@elischer.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: AltQ + ng_iface
Message-ID:  <200507312253.29038.doconnor@gsoft.com.au>
In-Reply-To: <42EBD738.2010105@elischer.org>
References:  <200507290834.10268.doconnor@gsoft.com.au> <200507310056.21857.doconnor@gsoft.com.au> <42EBD738.2010105@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507312253.29038.doconnor>