188.8.131.52. Device Management
echo 1 > /sys/bus/pci/devices/<bdf>/mcdma_ipreset
When the userspace application calls the open system call on the char dev node, kernel module checks and allocates an available channel to that application and stores the channel context in a private area of the file descriptor context, and the file descriptor is returned. The same file descriptor is used for further channel-specific operations.
Once all the DMA transactions are completed, you must close the file allocated during opening of the device. As part of this, kernel retrieves the channel context associated to that device and frees the same to device.
Read & Write
When the userspace application wants to perform DMA, it is needed to call standard read/write system calls by providing the pre-allocated DMA memory acquired from the libmcmem library. The application must provide the physical starting address of the buffer. The kernel module converts the DMA buffer into a Hardware specified descriptor and submits it.
Readv & Writev
Readv & writev system calls are used to submit DMA requests in batches.
Did you find the information on this page useful?