git: wg: Port #17: adapt ifp->if_output() routine

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


commit 38dee1cd5df84d75e1c95e7123d354e1c2782428
Author: Aaron LI <aly at aaronly.me>
Date:   Thu Oct 19 16:03:38 2023 +0800

    wg: Port #17: adapt ifp->if_output() routine
    
    Remove the original unsupported/unnecessary wg_transmit() routine, and
    combine the wg_xmit() routine into wg_output() routine, and then adapt
    it to our if_output() API.
    
    WireGuard already implements the wg_queue API to queue the output
    packets for encryption before sending, so we don't have to use any
    if_snd/ifq/ifaltq_subque, thus ifp->if_start() can also be ignored.
    However, we still need to call ifq_set_maxlen() and ifq_set_ready()
    to suppress the warning "driver didn't set altq_maxlen".

Summary of changes:
 sys/net/wg/if_wg.c | 193 ++++++++++++++++++++++++-----------------------------
 1 file changed, 88 insertions(+), 105 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/38dee1cd5df84d75e1c95e7123d354e1c2782428


-- 
DragonFly BSD source repository


More information about the Commits mailing list