git: net: Update rt_msg_mbuf() to pre-allocate the required mbuf (chain)

Aaron LI aly at crater.dragonflybsd.org
Mon Jan 1 18:22:13 PST 2024


commit 3079dadf4fdabb41477c3cb593680cdd96dd2089
Author: Aaron LI <aly at aaronly.me>
Date:   Mon Jan 1 21:44:50 2024 +0800

    net: Update rt_msg_mbuf() to pre-allocate the required mbuf (chain)
    
    Pre-calculate the required mbuf (chain) length and allocate it, and thus
    just use m_copyback() instead of m_copyback2() as there is no longer
    need to extend it.
    
    Suggested-by: dillon

Summary of changes:
 sys/net/rtsock.c | 27 +++++++++++++++++++++------
 1 file changed, 21 insertions(+), 6 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3079dadf4fdabb41477c3cb593680cdd96dd2089


-- 
DragonFly BSD source repository


More information about the Commits mailing list