Jason Thorpe
2020-01-17 22:19:24 UTC
Hey folks --
IFF_OACTIVE is problematic for NET_MPSAFE because it lives in ifnet::if_flags, but needs to be fiddled with when ifnet::if_ioctl_lock is not held.
In some ways, I question the utility of IFF_OACTIVE .. at best, it avoids calling (*if_start)() if there are no transmit slots available... but that situation is something that (*if_start)() routines need to handle anyway.
OpenBSD addressed the issue by making the "output active" indicator an independent atomically settable field in the interface queue structure, and replacing direct manipulation of IFF_OACTIVE in ifnet::if_flags with accessor / mutator functions. Reporting of IFF_OACTIVE to userspace is maintained by returning the traditional flag in the ifreq.
I'm not opposed to adopting OpenBSD's approach to fixing this problem, but if we can agree that IFF_OACTIVE is not useful in the first place, then I'd prefer to just rip it out completely.
Thoughts?
-- thorpej
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
IFF_OACTIVE is problematic for NET_MPSAFE because it lives in ifnet::if_flags, but needs to be fiddled with when ifnet::if_ioctl_lock is not held.
In some ways, I question the utility of IFF_OACTIVE .. at best, it avoids calling (*if_start)() if there are no transmit slots available... but that situation is something that (*if_start)() routines need to handle anyway.
OpenBSD addressed the issue by making the "output active" indicator an independent atomically settable field in the interface queue structure, and replacing direct manipulation of IFF_OACTIVE in ifnet::if_flags with accessor / mutator functions. Reporting of IFF_OACTIVE to userspace is maintained by returning the traditional flag in the ifreq.
I'm not opposed to adopting OpenBSD's approach to fixing this problem, but if we can agree that IFF_OACTIVE is not useful in the first place, then I'd prefer to just rip it out completely.
Thoughts?
-- thorpej
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de