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

Perhaps splusb is required, but then it's unclear to me what is actually
being protected which isn't already protected by mutex(es).

eg, look what wm(4) idoes with WM_MPSAFE usage.  are we getting
ahead of ourselves in usb? :)

Maybe, but I don't think so.

Nick


Home | Main Index | Thread Index | Old Index