From owner-freebsd-net@FreeBSD.ORG Thu May 22 06:05:27 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 4204537B401 for ; Thu, 22 May 2003 06:05:27 -0700 (PDT) Received: from mail.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id E418C43FA3 for ; Thu, 22 May 2003 06:05:25 -0700 (PDT) (envelope-from ddolson@sandvine.com) Received: by mail.sandvine.com with Internet Mail Service (5.5.2653.19) id ; Thu, 22 May 2003 09:05:24 -0400 Message-ID: From: Dave Dolson To: 'Julian Elischer' , Vincent Jardin Date: Thu, 22 May 2003 09:05:23 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" cc: freebsd-net@freebsd.org 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: Thu, 22 May 2003 13:05:27 -0000 Julian Elischer wrote: > On Wed, 21 May 2003, Vincent Jardin wrote: > > > 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(). > > The change is ok as long as you know that you are at splnet. I was trying to understand why it would be wrong to call ng_send_data from an interrupt running at splimp(). Is this the correct explanation: The netgraph (and most of net) code protects its data structures at splnet() under the assumption that no routine capable of interrupting it will affect those data structures. And the ether device interrupt routine can interrupt code at splnet(). BTW, in FreeBSD how does one determine the spl level at which a device's interrupt routines execute? Thanks for the feedback, David Dolson (ddolson@sandvine.com, www.sandvine.com)