I was studying DMA proxy and DMA proxy channels. Basically they are like letting Userspace application to write tx, read rx kernel data-structures. and let the device to access virtual memory data structures since devices understand physical addresses.
This code https://github.com/mstuehn/dma_proxy/blob/master/dma_proxy_test.c
and this article that I am reading https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842418/Linux+DMA+From+User+Space
And from this Thesis http://www.diva-portal.org/smash/get/diva2:22746/FULLTEXT01.pdf it says this
in Linux the kernel uses virtual memory address but most hardware systems use physical address for bus addressing. For hardware to be able to access data structures residing in kernel virtual memory space these structures have to be mapped to physical memory address. Its not sufficient to use simple address conversion methods since some system memory management unit have to be re-programmed and bounce buffers have to be used (probably in system memory management unit -- please clarify).
I think I have some grasp of dma proxy drivers and associated Userspace application(What I am guessing is it is used in embedded Linux systems).
But What's the point of all of this for example if I am looking at NIC card, then whatever I suppose to get with the mmap call in Userspace application and Kernel implementation of MMAP
in proxy driver will have kernel data structure. in case of NIC card the RX/TX will be the device specific data structures representation in kernel memory space since geting struct ethhdr
/ struct iphdr
/ struct tcphdr
/ etc. from return of mmap is not possible since the above paragraph from thesis says conversion of virtual addresses to Userspace addresses is probably not possible (basically it says physical address. I am assuming this from the text read )
So basically I am not fully getting the use of dma proxy drivers. I need some explanation to clear this out and how can the return of mmap
calls be used in applications i.e. server applications in embedded Linux systems