Page MenuHomeFreeBSD

net80211: move the storing of ni in the mbuf further down
Changes PlannedPublic

Authored by bz on Sun, Apr 13, 11:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 17, 8:08 AM
Unknown Object (File)
Thu, Apr 17, 6:54 AM
Unknown Object (File)
Thu, Apr 17, 4:49 AM
Unknown Object (File)
Thu, Apr 17, 2:45 AM
Unknown Object (File)
Thu, Apr 17, 2:10 AM
Unknown Object (File)
Thu, Apr 17, 1:39 AM
Unknown Object (File)
Thu, Apr 17, 12:28 AM
Unknown Object (File)
Wed, Apr 16, 8:34 PM

Details

Reviewers
None
Group Reviewers
wireless
Summary

We store the node (ni) in the mbuf meta data already after
ieee80211_dwds_mcast() (see comment). However ieee80211_encap()
further down can possibly allocate a new mbuf calling into
ieee80211_mbuf_adjust() so move storing the node information right
in front of the call which will rely on it to avoid any further
problems.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 63491
Build 60375: arc lint + arc unit

Event Timeline

bz requested review of this revision.Sun, Apr 13, 11:13 PM

Is that true though? like, the superg/amsdu transmit path is also queuing the packet and it needs the node reference for it to do so.

bz planned changes to this revision.Sun, Apr 13, 11:37 PM

Is that true though? like, the superg/amsdu transmit path is also queuing the packet and it needs the node reference for it to do so.

Sugar. And ff_transmit() has the same problem that it might lose it and then we go kaboom in ieee80211_parent_xmitpkt error case; okay; there's also an improvement to be had there. I'll do the other one first and revise this. I think the answer is to audit ieee80211_encap callers and if all do the same make sure ieee80211_encap preserves the meta information.

Yeah, let's both do that (some auditing/review) first.

My earlier diff on documenting the transmit paths at least document the node ref stuff, I can also go document the encap behaviour too in another diff.