Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 May 2018 14:37:55 +0530
From:      Pratyush Yadav <pratyush@freebsd.org>
To:        freebsd-hackers@freebsd.org
Cc:        Edward Napierala <trasz@freebsd.org>, Akshay Jaggi <jaggi@freebsd.org>
Subject:   Why is there no bus_dmamap_load_sg()?
Message-ID:  <CA%2BX=3TK_v2Sby0fP57XB2T2WQpJ6mebE4doF6AiVJNHYHxPU8A@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BX=3TK_v2Sby0fP57XB2T2WQpJ6mebE4doF6AiVJNHYHxPU8A>