Date: Wed, 21 May 2003 23:41:11 +0200 From: Vincent Jardin <vjardin@wanadoo.fr> To: Dave Dolson <ddolson@sandvine.com>, freebsd-net@freebsd.org Subject: Re: netgraph: why does ng_ether bother enqueuing packets? Message-ID: <200305212341.11282.vjardin@wanadoo.fr> In-Reply-To: <FE045D4D9F7AED4CBFF1B3B813C8533701918C71@mail.sandvine.com> References: <FE045D4D9F7AED4CBFF1B3B813C8533701918C71@mail.sandvine.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Le Mercredi 21 Mai 2003 23:03, Dave Dolson a =E9crit :
> For reasons of performance, I tried the following modification to
> ng_ether.c in FreeBSD 4.7, and it seemed to work fine.
> The change is to call ng_send_data() vs. ng_queue_data().
>
> We are running in polling mode, so ng_ether_input is called @ netisr
> anyhow. (Always ?)
What's about the ng_ether's node that are created on the ethernet interfa=
ces=20
that do not support polling ?
>
> static void
> ng_ether_input2(node_p node, struct mbuf **mp, struct ether_header *e=
h)
> {
> const priv_p priv =3D node->private;
> meta_p meta =3D NULL;
> int error;
>
> /* Glue Ethernet header back on */
> if ((error =3D ng_ether_glueback_header(mp, eh)) !=3D 0)
> return;
>
> /* Send out lower/orphan hook */
> + #ifdef DEVICE_POLLING
> + /* send directly, since we're already @ splnet */
> + (void)ng_send_data(priv->lower, *mp, meta);
> + #else
> (void)ng_queue_data(priv->lower, *mp, meta);
> + #endif
> *mp =3D NULL;
> }
>
> Does anyone know why this might be bad?
> Any reason why this couldn't be done in interrupt (non-polling) mode al=
so?
>
> The system's main purpose is to process packets.
>
> Thanks,
> David Dolson (ddolson@sandvine.com, www.sandvine.com)
>
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305212341.11282.vjardin>
