Why is there no bus_dmamap_load_sg()?

Pratyush Yadav pratyush at freebsd.org
Sat May 26 09:08:44 UTC 2018


Hi all,

I am working on Xen this summer [0], and I have to use the bus_dma(9)
interface extensively during the course of the project.

I was looking at the man page and I notice the function
bus_dmamap_load_mbuf_sg() which directly returns the segment array to
the client. But a similar variant of bus_dmamap_load() is missing.
This variant would be useful to me and help me in my work.

Is there a reason the sg variant was only implemented for mbufs?

I was looking at the code in sys/kern/subr_bus_dma.c and a
bus_dmamap_load_sg() does not look too difficult to implement. Is it
ok if I submit a patch implementing it?

-- 
Regards,
Pratyush Yadav


[0] https://wiki.freebsd.org/SummerOfCode2018Projects/ImportXenbus_dmaFromOpenBSD


More information about the freebsd-hackers mailing list