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
Differential D40880
memdesc: Retire MEMDESC_CCB. jhb on Jul 5 2023, 11:08 PM. Authored by Tags None Referenced Files
Details
Instead, change memdesc_ccb to examine the CCB and return a memdesc Sponsored by: Chelsio Communications
Diff Detail
Event TimelineComment Actions 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.) Comment Actions This looks good to me... I'm glad we're reducing the knowledge of CCBs outside of CAM proper. Comment Actions Hi, --- 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 |