HomeFreeBSD

mbuf: add mc_split() that works on two struct mchain

Description

mbuf: add mc_split() that works on two struct mchain

It preserves tail points and all length/memory accounting, so that caller
doesn't need to do any extra traversals. It doesn't respect M_PKTHDR but
it may be improved if needed. It respects M_EOR, though. First consumer
will be the new unix(4) SOCK_STREAM and SOCK_SEQPACKET.

Also provide much more simple mc_concat() that glues two chains back.

Reviewed by: markj
Differentail Revision: https://reviews.freebsd.org/D44148

Details

Provenance
glebiusAuthored on Apr 8 2024, 8:16 PM
Parents
rGab8a51c45586: mbuf: provide new type for mbuf manipulation - mbuf chain
Branches
Unknown
Tags
Unknown