git: wg: Port #34: adapt if_wg.c to not use epoch

Aaron LI aly at crater.dragonflybsd.org
Thu Feb 8 00:32:32 PST 2024


commit e2854f7ec3b20b8bcf2d120cad8e72bb247ee125
Author: Aaron LI <aly at aaronly.me>
Date:   Sun Dec 31 23:03:26 2023 +0800

    wg: Port #34: adapt if_wg.c to not use epoch
    
    The relevant code is already using atomic operations.  I don't think the
    epoch, especially the NET global epoch, is actually required here.  So I
    decided to remove the epoch operations; however, wg_timers_disable() has
    been changed to use callout_drain() instead of callout_stop() to wait
    the callout cancellation to complete.
    
    Meanwhile, simplify wg_timers_set_persistent_keepalive() by referring to
    OpenBSD's code.

Summary of changes:
 sys/net/wg/if_wg.c | 64 ++++++++----------------------------------------------
 1 file changed, 9 insertions(+), 55 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e2854f7ec3b20b8bcf2d120cad8e72bb247ee125


-- 
DragonFly BSD source repository


More information about the Commits mailing list