Page MenuHomeFreeBSD

memdesc: Retire MEMDESC_CCB.
ClosedPublic

Authored by jhb on Jul 5 2023, 11:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 5, 6:32 PM
Unknown Object (File)
Nov 19 2024, 4:21 AM
Unknown Object (File)
Oct 25 2024, 7:26 AM
Unknown Object (File)
Oct 22 2024, 10:59 AM
Unknown Object (File)
Oct 22 2024, 10:58 AM
Unknown Object (File)
Oct 21 2024, 2:57 AM
Unknown Object (File)
Sep 30 2024, 4:03 AM
Unknown Object (File)
Sep 27 2024, 12:54 PM
Subscribers

Details

Reviewers
imp
markj
Group Reviewers
cam
Commits
rG60381fd1ee86: memdesc: Retire MEMDESC_CCB.
Summary

Instead, change memdesc_ccb to examine the CCB and return a memdesc
of a more generic type describing the data buffer.

Sponsored by: Chelsio Communications

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Jul 5 2023, 11:08 PM

We could possibly also do this for struct bio where memdesc_bio returned a more generic type if we added a lower-level MEMDESC_VMPAGES. That would require bloating the type though as you need to store the vm_page_t array pointer (union member), bio_ma_offset, and total size. That said, on LP64 there's already a 4 byte padding hole at the end that could hold bio_ma_offset.

(I had another place that had to duplicate this logic for CCBs and bio's in the NVMF TCP transport layer that generated mbuf chains to describe a memdesc buffer.)

This revision is now accepted and ready to land.Jul 7 2023, 4:28 PM

This looks good to me... I'm glad we're reducing the knowledge of CCBs outside of CAM proper.

This revision was automatically updated to reflect the committed changes.

Hi,
I noticed build failure in _.amd64.FIRECRACKER when giving # make -j6 tinderbox TARGETS=amd64

--- kernel.full ---
linking kernel.full
ld: error: undefined symbol: memdesc_ccb
>>> referenced by subr_bus_dma.c:466 (/usr/src/sys/kern/subr_bus_dma.c:466)
>>>               subr_bus_dma.o:(bus_dmamap_load_ccb)
*** [kernel.full] Error code 1

make[5]: stopped in /usr/obj/usr/src/amd64.amd64/sys/FIRECRACKER
1 error

make[5]: stopped in /usr/obj/usr/src/amd64.amd64/sys/FIRECRACKER
     2079.38 real      1867.10 user       185.11 sys

make[4]: stopped in /usr/src

make[3]: stopped in /usr/src