git: net/radix: Document rn_inithead() and change to use byte offset

Aaron LI aly at crater.dragonflybsd.org
Mon Nov 13 17:46:26 PST 2023


commit 51203098397cf82ada6143856e543f5c3b75a936
Author: Aaron LI <aly at aaronly.me>
Date:   Mon Nov 13 13:05:42 2023 +0800

    net/radix: Document rn_inithead() and change to use byte offset
    
    The radix code only supports offset bit being multiple of bytes but not
    any byte fraction, so it's clearer and better to just use byte offset
    instead of bit offset.  In addition, the caller can be easier to
    determine this argument using offsetof().
    
    On the other hand, ignore this off_bytes parameter and auto set it to
    zero when to create a mask tree.
    
    Also add a detailed description for rn_inithead().

Summary of changes:
 sys/net/radix.c | 31 ++++++++++++++++++++++++++++---
 sys/net/radix.h |  3 ++-
 2 files changed, 30 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/51203098397cf82ada6143856e543f5c3b75a936


-- 
DragonFly BSD source repository


More information about the Commits mailing list