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
F132560601: D34059.id.diff
Fri, Oct 17, 11:52 PM
F132560596: D34059.id101989.diff
Fri, Oct 17, 11:52 PM
F132560590: D34059.id102479.diff
Fri, Oct 17, 11:51 PM
Unknown Object (File)
Fri, Oct 17, 2:17 PM
Unknown Object (File)
Fri, Sep 26, 6:00 PM
Unknown Object (File)
Sep 1 2025, 7:38 AM
Unknown Object (File)
Aug 25 2025, 12:46 PM
Unknown Object (File)
Aug 19 2025, 2:13 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