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)
Wed, Apr 3, 1:13 AM
Unknown Object (File)
Jan 15 2024, 10:50 AM
Unknown Object (File)
Dec 23 2023, 1:17 AM
Unknown Object (File)
Dec 21 2023, 7:13 AM
Unknown Object (File)
Dec 10 2023, 9:18 PM
Unknown Object (File)
Dec 9 2023, 4:37 AM
Unknown Object (File)
Sep 13 2023, 2:49 PM
Unknown Object (File)
Sep 11 2023, 3:20 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable