Multi Channel DMA Intel® FPGA IP for PCI Express* User Guide

ID 683821
Date 7/30/2024
Public
Document Table of Contents

8.1.6.5. ifc_qdma_channel_get

Table 103.  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 to acquire the channel and pass the context on further interactions with framework.

This API performs 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. In case if you pass this parameter as -1, it returns available free channel. Otherwise, it allocates the available free channel.

qdev: QDMA device

chnl: Pointer to update channel context

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

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.