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
Unknown Object (File)
Dec 1 2025, 12:52 AM
Unknown Object (File)
Nov 23 2025, 9:58 AM
Unknown Object (File)
Nov 22 2025, 2:29 PM
Unknown Object (File)
Nov 11 2025, 4:10 AM
Unknown Object (File)
Nov 9 2025, 11:24 PM
Unknown Object (File)
Oct 27 2025, 7:29 AM
Unknown Object (File)
Oct 17 2025, 11:52 PM
Unknown Object (File)
Oct 17 2025, 11:52 PM

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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable