1. Introduction
This guide outlines the steps to migrate from the QDMA Linux driver to the MDB5 DMA driver. MDB5 DMA retains the familiar userspace applications and command structure (dma-to-device, dma-from-device, dma-ctl, dma-xfer) while transitioning the underlying driver architecture from a custom libqdma framework to the standard Linux DMAEngine API with in-kernel dw-edma controller. Most application-level code patterns and workflows remain unchanged, with migration primarily focused on adapting to the new queue/channel management model.
2. Key Architecture Differences
2.1 Architectural Overview
While MDB5 DMA maintains the same userspace application names and similar command-line interfaces, the underlying drivers use the standard kernel frameworks:
| Aspect | QDMA | MDB5 DMA |
|---|---|---|
| Controller Driver | Custom out-of-tree module (qdma-pf.ko, qdma-vf.ko) |
In-kernel dw-edma (built-in) |
| Driver Architecture | Single driver module | Separate client driver module (mdb5-dmaclient-drv.ko) on top of dw-edma |
| User Interface | Character device with Ioctl, Sysfs and Netlink | Character device with Ioctl |
| Queue Model | Queue based (up to 2048/4096 queues) | Channel based (8 read + 8 write channels) |
| Transfer Modes | MM (Memory Mapped), ST (Streaming) | MM (Memory Mapped) |
| Interrupt Modes | Poll, Direct, Indirect (Aggregation), Legacy, Auto | Interrupt-driven with poll thread |
| SR-IOV | Yes (4 PF, 252 VF) | Not supported |
| Framework | Custom Libqdma | Linux DMAEngine API |
| Descriptor Bypass | Supported (desc_bypass_en, pfetch_bypass_en flags via dma-ctl) |
Not supported |