tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/usb



On Mon, Jun 24, 2019 at 08:39:08AM +0100, Nick Hudson wrote:
> 
> 
> On 24/06/2019 04:30, matthew green wrote:
> > > > splnet is obsolete in modern USB network drivers.
> > > > all the code runs at softipl.
> > > > 
> > > > removing spl was done entirely on purpose.
> > > 
> > > I saw the comment of ether_ioctl in sys/net/if_ethersubr.c
> > > > Note, we must be called at splnet().
> > > so I asked.
> > 
> > that comment is true for old style drivers, but looking at other
> > drivers they also only skip this for NET_MPSAFE kernel builds.
> > 
> > Nick, do we need to make these go back to non-mpsafe stuff for
> > networking if !NET_MPSAFE?
> 
> I'm really not sure.
> 
> splnet is to prevent IPL_NET interrupt handlers (common for most
> drivers) from running.  USB ethernet devices don't have these, however.
> All handling of device to host communications is done via USB callbacks
> which run at splsoftserial (aka splusb).

Actually, I think splnet() ( + KERNEL_LOCK) is used to protect the network
stack when NET_MPSAFE is not defined.

For example pppoe(4) uses it when NET_MPSAFE is not defined.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index