Page MenuHomeFreeBSD

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

Authored by glebius on Feb 29 2024, 7:03 AM.
Tags
None
Referenced Files
F83597963: D44148.diff
Sun, May 12, 11:29 AM
F83576323: D44148.id135829.diff
Sun, May 12, 3:03 AM
Unknown Object (File)
Sat, May 11, 12:51 PM
Unknown Object (File)
Fri, May 10, 2:21 PM
Unknown Object (File)
Fri, May 10, 2:19 PM
Unknown Object (File)
Fri, May 10, 2:18 PM
Unknown Object (File)
Tue, May 7, 1:47 AM
Unknown Object (File)
Mon, May 6, 8:18 PM

Details

Reviewers
markj
Group Reviewers
transport
network
Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 56646
Build 53534: arc lint + arc unit

Event Timeline

tuexen added inline comments.
sys/sys/mbuf.h
1753–1754

If adding mc_concat is intended, mention it in the commit message. Right now it looks like it slipped in the diff...

markj added inline comments.
sys/kern/uipc_mbuf.c
1125

This should assert that M_PKTHDR isn't set in head.

sys/kern/uipc_mbuf.c
1145

Do we prefer m_align() in new code?

Mention mc_concat() in commit message.

This revision is now accepted and ready to land.Mar 18 2024, 5:08 AM

Utilize mc_first, mc_last, etc.

This revision now requires review to proceed.Mar 18 2024, 6:11 PM
This revision is now accepted and ready to land.Mar 19 2024, 5:06 AM