git: wg: Port #33: refactor noise remote functions to avoid epoch
Aaron LI
aly at crater.dragonflybsd.org
Thu Feb 8 00:32:32 PST 2024
commit ef7d48a714d34e320587cd6843ee9683746a8c0f
Author: Aaron LI <aly at aaronly.me>
Date: Fri Dec 29 23:59:56 2023 +0800
wg: Port #33: refactor noise remote functions to avoid epoch
- Refactor the functions to avoid using epoch or deferred operations.
So noise_remote_free() is simplified and no longer requires an async
cleanup function.
- Remove 'refcount_acquire_if_not_zero()' and use plain refcount instead,
since there's no more deferred frees.
- Use shared locks instead of epoch sections; meanwhile, rename
'l_remote_mtx'/'l_index_mtx' to 'l_remote_lock'/'l_index_lock' because
they now supports both shared and exclusive locks.
- Simplify noise_remote_index_insert() and remove the unnecessary
pre-trial.
- Merge wg_peer_free_deferred() into wg_peer_destroy() and remove it.
Summary of changes:
sys/net/wg/if_wg.c | 51 +++++++++-----------
sys/net/wg/wg_noise.c | 126 ++++++++++++++++++++------------------------------
sys/net/wg/wg_noise.h | 2 +-
3 files changed, 74 insertions(+), 105 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ef7d48a714d34e320587cd6843ee9683746a8c0f
--
DragonFly BSD source repository
More information about the Commits
mailing list