Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 May 2003 11:41:54 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        Dave Dolson <ddolson@sandvine.com>
Cc:        freebsd-net@freebsd.org
Subject:   RE: netgraph: why does ng_ether bother enqueuing packets?
Message-ID:  <Pine.BSF.4.21.0305221139090.82473-100000@InterJet.elischer.org>
In-Reply-To: <FE045D4D9F7AED4CBFF1B3B813C8533701918C75@mail.sandvine.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On Thu, 22 May 2003, Dave Dolson wrote:

> 
> 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().


yes.
it upgrades itself to splimp at crucial points (i.e.
when passing data to the driver or dequeueing data from the queue)

> 
> BTW, in FreeBSD how does one determine the spl level at which a device's
> interrupt routines execute?
>

When you declare the interrupt driver that information is a part of the 
declaration (either if you folllow the pointers).
 
> 
> Thanks for the feedback,
> David Dolson (ddolson@sandvine.com, www.sandvine.com)
> 
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0305221139090.82473-100000>