Page MenuHomeFreeBSD

dummynet: don't use per-vnet locks to protect global data.
ClosedPublic

Authored by kp on Jan 27 2022, 10:48 AM.
Tags
None
Referenced Files
F84228149: D34059.diff
Tue, May 21, 2:30 AM
Unknown Object (File)
Mon, May 20, 2:20 AM
Unknown Object (File)
Sun, May 19, 8:05 PM
Unknown Object (File)
Fri, May 17, 4:43 PM
Unknown Object (File)
Sat, May 11, 8:42 PM
Unknown Object (File)
Fri, May 10, 3:44 AM
Unknown Object (File)
Apr 3 2024, 1:13 AM
Unknown Object (File)
Jan 15 2024, 10:50 AM

Details

Summary

The ref_count counter is global (i.e. not per-vnet) so we can't use a
per-vnet lock to protect it. Moreover, in callouts curvnet is not set,
so we'd end up panicing when trying to use DN_BH_WLOCK().

Instead we use the global sched_lock, which is already used when
evaluating ref_count (in unload_dn_aqm()).

Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 44119
Build 41007: arc lint + arc unit