Page MenuHomeFreeBSD

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

Authored by bz on Apr 13 2025, 11:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jun 2 2026, 1:58 PM
Unknown Object (File)
May 28 2026, 7:35 PM
Unknown Object (File)
May 20 2026, 10:18 AM
Unknown Object (File)
May 19 2026, 9:46 AM
Unknown Object (File)
May 17 2026, 1:44 AM
Unknown Object (File)
Feb 8 2026, 11:18 AM
Unknown Object (File)
Dec 26 2025, 11:54 PM
Unknown Object (File)
Dec 15 2025, 11:00 AM

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.Apr 13 2025, 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.Apr 13 2025, 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.