Page MenuHomeFreeBSD

LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls
AcceptedPublic

Authored by bz on Feb 18 2024, 10:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 18, 10:21 AM
Unknown Object (File)
Sat, May 11, 5:07 AM
Unknown Object (File)
Fri, May 10, 8:52 PM
Unknown Object (File)
Fri, May 10, 4:39 PM
Unknown Object (File)
Tue, May 7, 3:11 AM
Unknown Object (File)
Sat, Apr 27, 7:19 AM
Unknown Object (File)
Fri, Apr 26, 12:52 PM
Unknown Object (File)
Fri, Apr 26, 10:07 AM

Details

Reviewers
cc
emaste
Summary

Lock the two TX MO downcalls into driver/firmware in
lkpi_80211_txq_tx_one() to make sure they cannot happen in the
middle of other (net80211 triggered) updates calling down into
the driver/firmware.

MFC after: 3 days

Diff Detail

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

Event Timeline

bz requested review of this revision.Feb 18 2024, 10:03 PM

I think LKPI_80211_LHW_LOCK_ASSERT can help remind us of such LKPI_80211_LHW_LOCK requirement for lkpi_80211_mo_* functions.

sys/compat/linuxkpi/common/src/linux_80211.c
3736

Please start by adding the LKPI_80211_LHW_LOCK_ASSERT for each lkpi_80211_mo_*. Here we shall add LKPI_80211_LHW_LOCK_ASSERT in lkpi_80211_mo_wake_tx_queue().

3751

Here we shall add LKPI_80211_LHW_LOCK_ASSERT in lkpi_80211_mo_tx().

cc requested changes to this revision.Mar 6 2024, 2:04 PM
This revision now requires changes to proceed.Mar 6 2024, 2:04 PM

@cc Adding LOCK asserts is a very good idea; not all the functions need them if I remember correctly. Should I really add it to this "fix" or should I do a separate full pass on the linux_80211_macops.c file?

In D43966#1023788, @bz wrote:

@cc Adding LOCK asserts is a very good idea; not all the functions need them if I remember correctly. Should I really add it to this "fix" or should I do a separate full pass on the linux_80211_macops.c file?

If you put a separate "full pass of asserts" on a plan, with more scrutiny and tests, then I think we can move forward with this fix.

This revision is now accepted and ready to land.Tue, Apr 23, 2:09 PM