Page MenuHomeFreeBSD

Extend m_copyback() to support unmapped mbufs.
ClosedPublic

Authored by jhb on May 5 2021, 9:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 1 2024, 11:12 PM
Unknown Object (File)
Mar 1 2024, 11:12 PM
Unknown Object (File)
Mar 1 2024, 11:11 PM
Unknown Object (File)
Mar 1 2024, 9:14 PM
Unknown Object (File)
Jan 13 2024, 9:11 PM
Unknown Object (File)
Jan 1 2024, 4:38 AM
Unknown Object (File)
Jan 1 2024, 4:38 AM
Unknown Object (File)
Jan 1 2024, 4:38 AM
Subscribers

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 39038
Build 35927: arc lint + arc unit

Event Timeline

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

m_unmappeduiomove() or so might be a better name then. Not sure if it's worth the churn.

This revision is now accepted and ready to land.May 6 2021, 1:48 PM
gallatin added inline comments.
sys/kern/uipc_mbuf.c
1889

We also have m_copyfromunmapped(). We could add a m_unmappeduiomove(.. int direction) and make the existing functions wrappers..

sys/kern/uipc_mbuf.c
1889

m_copy{to,from}unmapped() are kind of wrappers already, they just construct different uio's to pass to this routine. In that regard they are similar to the physcopy{in,out} wrappers around uiomove_fromphys(). uiomove_fromphys() suffers similar naming issues (it copies to/from physical pages, not only from physical pages). This routine is also used by m_mbuftouio() which is where it gets is original name from. I don't mind renaming this. It isn't a lot of churn. The one use case outside of this file is in soreceive() where it is paired with uiomove(), so something in the uiomove_* namespace ala uiomove_fromphys() might not be a bad name for it.

sys/kern/uipc_mbuf.c
1889

I don't have strong feelings about it. The m_* namespace makes more sense to me for this routine, so I'm inclined to prefer m_unmapped_uiomove(), but uiomove_mbuf_unmapped() or so would be ok. The name uiomove_fromphys() has always bugged me for exactly the reason you point out.

sys/kern/uipc_mbuf.c
1889

I'll add a followup commit after this one that renames it to m_unmapped_uiomove().

This revision was automatically updated to reflect the committed changes.