HomeFreeBSD

unix/dgram: reduce mbuf chain traversals in send(2) and recv(2)

Description

unix/dgram: reduce mbuf chain traversals in send(2) and recv(2)

o Use m_pkthdr.memlen from m_uiotombuf()
o Modify unp_internalize() to keep track of allocated space and memory

as well as pointer to the last buffer.

o Modify unp_addsockcred() to keep track of allocated space and memory

as well as pointer to the last buffer.

o Record the datagram len/memlen/ctllen in the first (from) mbuf of the

chain in uipc_sosend_dgram() and reuse it in uipc_soreceive_dgram().

Reviewed by: markj
Differential revision: https://reviews.freebsd.org/D35302

Details

Provenance
glebiusAuthored on Jun 24 2022, 4:09 PM
Reviewer
markj
Differential Revision
D35302: unix/dgram: reduce mbuf chain traversals in send(2) and recv(2)
Parents
rG9b841b0e2390: m_uiotombuf: write total memory length of the allocated chain in pkthdr
Branches
Unknown
Tags
Unknown