[PATCH v4 1/1] lib/dma: add control-plane APIs for inter-domain DMA transfers
Thomas Monjalon
thomas at monjalon.net
Sun Oct 19 10:12:04 CEST 2025
17/10/2025 16:06, Vamsi Krishna:
> From: Vamsi Attunuru <vattunuru at marvell.com>
>
> Secure and controlled inter-domain DMA transfers require dedicated
> control-plane APIs to create and manage access groups.
>
> DMA devices used for inter-process data transfer can be categorized as
> follows:
>
> Class A: Both endpoints require a DMA device for data transfer (e.g.,
> Marvell DMA devices).
> Class B: Only one endpoint requires a DMA device; the other does not.
> Class C: Other device types not currently classified.
>
> Providing a unified API for all these categories is complex, as Linux
> and other operating systems do not offer native control-plane APIs for
> this purpose. Therefore, DPDK can implement its own control-plane
> mechanisms to support Class A, B, and C devices.
>
> This commit introduces the necessary APIs for Class A DMA devices.
> Devices can create or join access groups using token-based
> authentication, ensuring that only authorized devices within the same
> group can perform DMA transfers across processes or OS domains.
>
> API Usage Flow:
>
> Process 1 (Group Creator):
> Invokes rte_dma_access_pair_group_create() to establish a new access
> pair group, then shares the group_id and token with Process 2 via IPC.
>
> Process 2 (Group Joiner):
> Receives the group_id and token from Process 1 and calls
> rte_dma_access_pair_group_join() to join the group.
>
> Both Processes:
> Use rte_dma_access_pair_group_handler_get() to obtain handler information
> for domains in the group.
> Perform DMA transfers as required.
>
> Process 2 (when finished):
> Calls rte_dma_access_pair_group_leave() to exit the group.
>
> Process 1:
> Monitors for group updates and confirms group membership as needed.
>
> Depends-on: patch-36386 (lib/dma: introduce inter-process and inter-OS DMA)
>
> Signed-off-by: Vamsi Attunuru <vattunuru at marvell.com>
> Acked-by: Chengwen Feng <fengchengwen at huawei.com>
Added experimental status, release notes, cleaned doc and logs.
It doesn't look ready but I've applied it because Chengwen Feng acked it.
I'm not sure about having different API functions for leave and destroy.
I think the last leaving should automatically call the destroy driver function.
More information about the dev
mailing list