GTS AXI Multichannel DMA IP for PCI Express* User Guide

ID 847470
Date 8/25/2025
Public
Document Table of Contents

B.1.6.5. ifc_qdma_channel_get

Table 84.   ifc_qdma_channel_get

API

API Description

Input Parameters

Return Values

int

ifc_qdma_channel_get (struct ifc_qdma_device * qdev , struct ifc_qdma_channel ** chnl , int chno )

Before submitting the DMA transactions, application is responsible for acquiring the channel and passing the context on further interactions with the framework.

This API performs the following:

  • Get the next available channel.
  • Initialize the descriptors and data memory for both TX and RX queues.
  • Enable the channel.

The last parameter in this API is the channel number. If you pass this parameter as -1, it returns the available free channel. Otherwise, it allocates the available free channel.

qdev: QDMA device

chnl: Pointer to update channel context

chno: Channel number if user wants a specific channel. -1 if no specific channel.

0 : on success and populates channel context.

-1 : No channel is ready to be used. Channel context is returned as NULL.

-2 : Requested channel is already allocated, but valid channel context is returned. Application may use this channel context.