From owner-freebsd-net@FreeBSD.ORG Wed May 21 14:40:29 2003 Return-Path: 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 A0ADE37B401 for ; Wed, 21 May 2003 14:40:29 -0700 (PDT) Received: from mwinf0604.wanadoo.fr (smtp3.wanadoo.fr [193.252.22.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 968A643F93 for ; Wed, 21 May 2003 14:40:28 -0700 (PDT) (envelope-from vjardin@wanadoo.fr) Received: from venus.vincentjardin.net (unknown [193.253.255.240]) by mwinf0604.wanadoo.fr (SMTP Server) with ESMTP id 266DF28000EA; Wed, 21 May 2003 23:40:27 +0200 (CEST) Content-Type: text/plain; charset="iso-8859-1" From: Vincent Jardin To: Dave Dolson , freebsd-net@freebsd.org Date: Wed, 21 May 2003 23:41:11 +0200 User-Agent: KMail/1.4.3 References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200305212341.11282.vjardin@wanadoo.fr> Subject: Re: netgraph: why does ng_ether bother enqueuing packets? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2003 21:40:30 -0000 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"