git: wg: Port #23: replace gtaskqueue with taskqueue(9) API

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


commit 18ffce4898186917f078dad2e9685b736c475f84
Author: Aaron LI <aly at aaronly.me>
Date:   Fri Oct 27 18:51:14 2023 +0800

    wg: Port #23: replace gtaskqueue with taskqueue(9) API
    
    While DragonFly has already imported FreeBSD gtaskqueue API, I
    personally think its implementation is unnecessarily complex, so I
    decided to replace it with the simpler taskqueue(9) API.
    
    I emulate the gtaskqueue_drain() API by randomly choosing one taskqueue
    among all CPUs for the task to distribute the work load.  The randomly
    chosen taskqueues are kept in the struct along with the task, so new
    struct fields are added accordingly.

Summary of changes:
 sys/net/wg/if_wg.c | 163 +++++++++++++++++++++++++++++++++--------------------
 1 file changed, 102 insertions(+), 61 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/18ffce4898186917f078dad2e9685b736c475f84


-- 
DragonFly BSD source repository


More information about the Commits mailing list