PDK API Guide for AM64x
PKTDMA Functions

Introduction

Functions

uint32_t CSL_pktdmaGetRevision (const CSL_PktdmaCfg *pCfg)
 Return revision of the PKTDMA module. More...
 
int32_t CSL_pktdmaGetRevisionInfo (const CSL_PktdmaCfg *pCfg, CSL_PktdmaRevision *pRev)
 Return revision information of the PKTDMA module. More...
 
void CSL_pktdmaInitCfg (CSL_PktdmaCfg *pCfg)
 Initialize contents of a PKTDMA configuration structure. More...
 
void CSL_pktdmaGetCfg (CSL_PktdmaCfg *pCfg)
 Return PKTDMA configuration information. More...
 
void CSL_pktdmaInitTxChanCfg (CSL_PktdmaTxChanCfg *pTxChanCfg)
 Initialize a CSL_PktdmaTxChanCfg structure. More...
 
void CSL_pktdmaInitRxChanCfg (CSL_PktdmaRxChanCfg *pRxChanCfg)
 Initialize a CSL_PktdmaRxChanCfg structure. More...
 
void CSL_pktdmaInitRxFlowCfg (CSL_PktdmaRxFlowCfg *pFlow)
 Initialize a CSL_PktdmaRxFlowCfg structure. More...
 
void CSL_pktdmaSetPerfCtrl (CSL_PktdmaCfg *pCfg, uint32_t rxRetryTimeoutCnt)
 Set performance control parmeters. More...
 
void CSL_pktdmaSetUtcCtrl (CSL_PktdmaCfg *pCfg, uint32_t startingThreadNum)
 [udmap_only] Set UTC control parmeters More...
 
int32_t CSL_pktdmaRxFlowCfg (CSL_PktdmaCfg *pCfg, uint32_t flow, const CSL_PktdmaRxFlowCfg *pFlow)
 Configure an RX flow. More...
 
int32_t CSL_pktdmaRxChanCfg (CSL_PktdmaCfg *pCfg, uint32_t chanIdx, const CSL_PktdmaRxChanCfg *pRxChanCfg)
 Configure an RX channel. More...
 
int32_t CSL_pktdmaTxChanCfg (CSL_PktdmaCfg *pCfg, uint32_t chanIdx, const CSL_PktdmaTxChanCfg *pTxChanCfg)
 Configure a TX channel. More...
 
int32_t CSL_pktdmaRxChanSetTrEvent (CSL_PktdmaCfg *pCfg, uint32_t chanIdx, uint32_t trEventNum)
 [udmap_only] Configure an RX channel TR event More...
 
int32_t CSL_pktdmaTxChanSetTrEvent (CSL_PktdmaCfg *pCfg, uint32_t chanIdx, uint32_t trEventNum)
 [udmap_only]Configure an TX channel TR event More...
 
int32_t CSL_pktdmaRxChanSetBurstSize (CSL_PktdmaCfg *pCfg, uint32_t chanIdx, CSL_PktdmaChanBurstSize burstSize)
 Configure RX channel burst size. More...
 
int32_t CSL_pktdmaTxChanSetBurstSize (CSL_PktdmaCfg *pCfg, uint32_t chanIdx, CSL_PktdmaChanBurstSize burstSize)
 Configure TX channel burst size. More...
 
int32_t CSL_pktdmaGetRxRT (const CSL_PktdmaCfg *pCfg, uint32_t chanIdx, CSL_PktdmaRT *pRT)
 Get an RX channel's real-time register values. More...
 
int32_t CSL_pktdmaGetTxRT (const CSL_PktdmaCfg *pCfg, uint32_t chanIdx, CSL_PktdmaRT *pRT)
 Get a TX channel's real-time register values. More...
 
int32_t CSL_pktdmaSetRxRT (CSL_PktdmaCfg *pCfg, uint32_t chanIdx, const CSL_PktdmaRT *pRT)
 Set an RX channel's real-time register values. More...
 
int32_t CSL_pktdmaSetTxRT (CSL_PktdmaCfg *pCfg, uint32_t chanIdx, const CSL_PktdmaRT *pRT)
 Set a TX channel's real-time register values. More...
 
int32_t CSL_pktdmaEnableTxChan (CSL_PktdmaCfg *pCfg, uint32_t chanIdx)
 Enable a transmit channel. More...
 
int32_t CSL_pktdmaDisableTxChan (CSL_PktdmaCfg *pCfg, uint32_t chanIdx)
 Disable a transmit channel. More...
 
int32_t CSL_pktdmaTeardownTxChan (CSL_PktdmaCfg *pCfg, uint32_t chanIdx, bool bForce, bool bWait)
 Teardown a transmit channel. More...
 
int32_t CSL_pktdmaPauseTxChan (CSL_PktdmaCfg *pCfg, uint32_t chanIdx)
 Pause a transmit channel. More...
 
int32_t CSL_pktdmaUnpauseTxChan (CSL_PktdmaCfg *pCfg, uint32_t chanIdx)
 Un-pause a transmit channel. More...
 
int32_t CSL_pktdmaTriggerTxChan (CSL_PktdmaCfg *pCfg, uint32_t chanIdx)
 [udmap_only] Send a trigger event to a TX channel More...
 
void CSL_pktdmaClearTxChanError (CSL_PktdmaCfg *pCfg, uint32_t chanIdx)
 Clear error indication in a transmit channel. More...
 
int32_t CSL_pktdmaEnableRxChan (CSL_PktdmaCfg *pCfg, uint32_t chanIdx)
 Enable a receive channel. More...
 
int32_t CSL_pktdmaDisableRxChan (CSL_PktdmaCfg *pCfg, uint32_t chanIdx)
 Disable a receive channel. More...
 
int32_t CSL_pktdmaTeardownRxChan (CSL_PktdmaCfg *pCfg, uint32_t chanIdx, bool bForce, bool bWait)
 Teardown a receive channel. More...
 
int32_t CSL_pktdmaPauseRxChan (CSL_PktdmaCfg *pCfg, uint32_t chanIdx)
 Pause a receive channel. More...
 
int32_t CSL_pktdmaUnpauseRxChan (CSL_PktdmaCfg *pCfg, uint32_t chanIdx)
 Un-pause a receive channel. More...
 
int32_t CSL_pktdmaTriggerRxChan (CSL_PktdmaCfg *pCfg, uint32_t chanIdx)
 [udmap_only] Send a trigger event to an RX channel More...
 
void CSL_pktdmaClearRxChanError (CSL_PktdmaCfg *pCfg, uint32_t chanIdx)
 Clear error indication in a receive channel. More...
 
void CSL_pktdmaCfgRxFlowIdFirewall (CSL_PktdmaCfg *pCfg, uint32_t outEvtNum)
 Configure the receive flow ID range firewall. More...
 
bool CSL_pktdmaGetRxFlowIdFirewallStatus (CSL_PktdmaCfg *pCfg, CSL_PktdmaRxFlowIdFirewallStatus *pRxFlowIdFwStatus)
 Get receive flow ID range firewall status information. More...
 
void CSL_pktdmaGetChanStats (const CSL_PktdmaCfg *pCfg, uint32_t chanIdx, CSL_PktdmaChanDir chanDir, CSL_PktdmaChanStats *pChanStats)
 Get channel statistics. More...
 
void CSL_pktdmaDecChanStats (CSL_PktdmaCfg *pCfg, uint32_t chanIdx, CSL_PktdmaChanDir chanDir, const CSL_PktdmaChanStats *pChanStats)
 Decrement channel statistics. More...
 
int32_t CSL_pktdmaGetChanPeerReg (const CSL_PktdmaCfg *pCfg, uint32_t chanIdx, CSL_PktdmaChanDir chanDir, uint32_t regIdx, uint32_t *pVal)
 Read a channel peer register. More...
 
int32_t CSL_pktdmaSetChanPeerReg (const CSL_PktdmaCfg *pCfg, uint32_t chanIdx, CSL_PktdmaChanDir chanDir, uint32_t regIdx, uint32_t *pVal)
 Write a channel peer register. More...
 
int32_t CSL_pktdmaEnableLink (CSL_PktdmaCfg *pCfg, uint32_t chanIdx, CSL_PktdmaChanDir chanDir)
 Enable a directional data flow for a paired link. More...
 

Function Documentation

◆ CSL_pktdmaGetRevision()

uint32_t CSL_pktdmaGetRevision ( const CSL_PktdmaCfg pCfg)

Return revision of the PKTDMA module.

This function returns the contents of the PKTDMA revision register. Consult the PKTDMA module documentation for a description of the contents of the revision register.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
Returns
The 32-bit revision register is returned.

◆ CSL_pktdmaGetRevisionInfo()

int32_t CSL_pktdmaGetRevisionInfo ( const CSL_PktdmaCfg pCfg,
CSL_PktdmaRevision pRev 
)

Return revision information of the PKTDMA module.

This function returns revision information for the PKTDMA module.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
pRev[OUT] Pointer to a CSL_PktdmaRevision structure where the revision information is returned
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_pktdmaInitCfg()

void CSL_pktdmaInitCfg ( CSL_PktdmaCfg pCfg)

Initialize contents of a PKTDMA configuration structure.

This function initializes the contents of the specified PKTDMA configuration structure.

All elements of the CSL_PktdmaCfg structure are initialized to zero.

This function should not be called after calling CSL_pktdmaGetCfg as the PKTDMA module configuration stored in the PKTDMA configuration structure will be overwritten with zeros.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
Returns
None

◆ CSL_pktdmaGetCfg()

void CSL_pktdmaGetCfg ( CSL_PktdmaCfg pCfg)

Return PKTDMA configuration information.

This function returns configuration and capability information for the PKTDMA module. See the CSL_PktdmaCfg structure for details on the information that is returned.

Parameters
pCfg[IN/OUT] Pointer to the PKTDMA configuration structure
Returns
None

◆ CSL_pktdmaInitTxChanCfg()

void CSL_pktdmaInitTxChanCfg ( CSL_PktdmaTxChanCfg pTxChanCfg)

Initialize a CSL_PktdmaTxChanCfg structure.

This function initializes the specified CSL_PktdmaTxChanCfg structure to known, safe values. Software then only needs to configure elements that are different than their initialized values prior to calling the CSL_pktdmaTxChanCfg function.

All elements of the CSL_PktdmaTxChanCfg structure are initialized to zero except for the following:

chanType        = CSL_PKTDMA_CHAN_TYPE_NORMAL;
fetchWordSize   = CSL_PKTDMA_FETCH_WORD_SIZE_16;
trEventNum      = CSL_PKTDMA_NO_EVENT;
errEventNum     = CSL_PKTDMA_NO_EVENT;
Parameters
pTxChanCfg[OUT] Pointer to a CSL_PktdmaTxChanCfg structure
Returns
None

◆ CSL_pktdmaInitRxChanCfg()

void CSL_pktdmaInitRxChanCfg ( CSL_PktdmaRxChanCfg pRxChanCfg)

Initialize a CSL_PktdmaRxChanCfg structure.

This function initializes the specified CSL_PktdmaRxChanCfg structure to known, safe values. Software then only needs to configure elements that are different than their initialized values prior to calling the CSL_pktdmaRxChanCfg function.

All elements of the CSL_PktdmaRxChanCfg structure are initialized to zero except for the following:

chanType            = CSL_PKTDMA_CHAN_TYPE_NORMAL;
fetchWordSize       = CSL_PKTDMA_FETCH_WORD_SIZE_16;
trEventNum          = CSL_PKTDMA_NO_EVENT;
errEventNum         = CSL_PKTDMA_NO_EVENT;
flowIdFwRangeCnt    = CSL_PKTDMA_RXCCFG_CHAN_RFLOW_RNG_FLOWID_CNT_RESETVAL;
Parameters
pRxChanCfg[OUT] Pointer to a CSL_PktdmaRxChanCfg structure
Returns
None

◆ CSL_pktdmaInitRxFlowCfg()

void CSL_pktdmaInitRxFlowCfg ( CSL_PktdmaRxFlowCfg pFlow)

Initialize a CSL_PktdmaRxFlowCfg structure.

This function initializes the specified CSL_PktdmaRxFlowCfg structure to known, safe values. Software then only needs to configure elements that are different than their initialized values prior to calling the CSL_pktdmaRxFlowCfg function.

All elements of the CSL_PktdmaRxFlowCfg structure are initialized to zero.

Parameters
pFlow[OUT] Pointer to a CSL_PktdmaRxFlowCfg structure
Returns
None

◆ CSL_pktdmaSetPerfCtrl()

void CSL_pktdmaSetPerfCtrl ( CSL_PktdmaCfg pCfg,
uint32_t  rxRetryTimeoutCnt 
)

Set performance control parmeters.

This function is used to set performance control paramaters available in the PKTDMA module.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
rxRetryTimeoutCnt[IN] This parameter specifies the minimum amount of time (in clock cycles) that an Rx channel will be required to wait when it encounters a buffer starvation condition and the Rx error handling bit is set to 1
Returns
None

◆ CSL_pktdmaSetUtcCtrl()

void CSL_pktdmaSetUtcCtrl ( CSL_PktdmaCfg pCfg,
uint32_t  startingThreadNum 
)

[udmap_only] Set UTC control parmeters

This function is used to set UTC control paramaters available in the PKTDMA module.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
startingThreadNum[IN] This parameter specifies the starting PSI-L thread number for the external UTC
Returns
None

◆ CSL_pktdmaRxFlowCfg()

int32_t CSL_pktdmaRxFlowCfg ( CSL_PktdmaCfg pCfg,
uint32_t  flow,
const CSL_PktdmaRxFlowCfg pFlow 
)

Configure an RX flow.

This function initializes a receive flow with values specified in the CSL_PktdmaRxFlowCfg structure.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
flow[IN] Index of the receive flow to initialize
pFlow[IN] Pointer to a CSL_PktdmaRxFlowCfg structure containing initialization values
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_pktdmaRxChanCfg()

int32_t CSL_pktdmaRxChanCfg ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx,
const CSL_PktdmaRxChanCfg pRxChanCfg 
)

Configure an RX channel.

This function initializes a receive channel with values specified in the CSL_PktdmaRxChanCfg structure.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] Index of the receive channel to initialize
pRxChanCfg[IN] Pointer to a CSL_PktdmaRxChanCfg structure containing initialization values
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_pktdmaTxChanCfg()

int32_t CSL_pktdmaTxChanCfg ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx,
const CSL_PktdmaTxChanCfg pTxChanCfg 
)

Configure a TX channel.

This function initializes a transmit channel with values specified in the CSL_PktdmaTxChanCfg structure.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] Index of the transmit channel to initialize
pTxChanCfg[IN] Pointer to a CSL_PktdmaTxChanCfg structure containing initialization values
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_pktdmaRxChanSetTrEvent()

int32_t CSL_pktdmaRxChanSetTrEvent ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx,
uint32_t  trEventNum 
)

[udmap_only] Configure an RX channel TR event

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] Index of the receive channel to initialize
trEventNum[IN] Specifies a global event number to generate anytime the required event generation criteria specified in a TR are met Set to CSL_PKTDMA_NO_EVENT for no event generation.
Returns
CSL_EUNSUPPORTED_CMD = Function is not supported

◆ CSL_pktdmaTxChanSetTrEvent()

int32_t CSL_pktdmaTxChanSetTrEvent ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx,
uint32_t  trEventNum 
)

[udmap_only]Configure an TX channel TR event

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] Index of the transmit channel to initialize
trEventNum[IN] Specifies a global event number to generate anytime the required event generation criteria specified in a TR are met Set to CSL_PKTDMA_NO_EVENT for no event generation.
Returns
CSL_EUNSUPPORTED_CMD = Function is not supported

◆ CSL_pktdmaRxChanSetBurstSize()

int32_t CSL_pktdmaRxChanSetBurstSize ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx,
CSL_PktdmaChanBurstSize  burstSize 
)

Configure RX channel burst size.

This function enables configuration of the nominal burst size and alignment for data transfers on the specified RX channel. The default burst size is 64 bytes (a value of CSL_PKTDMA_CHAN_BURST_SIZE_64_BYTES).

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] Index of the receive channel to initialize
burstSize[IN] Burst size value. See CSL_PktdmaChanBurstSize for a list of valid burst size values.
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (burstSize is invalid or this function is not available in the version of PKTDMA being used)

◆ CSL_pktdmaTxChanSetBurstSize()

int32_t CSL_pktdmaTxChanSetBurstSize ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx,
CSL_PktdmaChanBurstSize  burstSize 
)

Configure TX channel burst size.

This function enables configuration of the nominal burst size and alignment for data transfers on the specified TX channel. The default burst size is 64 bytes (a value of CSL_PKTDMA_CHAN_BURST_SIZE_64_BYTES).

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] Index of the transmit channel to initialize
burstSize[IN] Burst size value. See CSL_PktdmaChanBurstSize for a list of valid burst size values.
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (burstSize is invalid or this function is not available in the version of PKTDMA being used)

◆ CSL_pktdmaGetRxRT()

int32_t CSL_pktdmaGetRxRT ( const CSL_PktdmaCfg pCfg,
uint32_t  chanIdx,
CSL_PktdmaRT pRT 
)

Get an RX channel's real-time register values.

This function returns the real-time register values for the specified receive channel.

Note that no parameter error checking is performed by this function for performance reasons.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] Index of the receive channel
pRT[OUT] Pointer to a CSL_PktdmaRT structure where values are returned
Returns
CSL_PASS = Function executed successfully

◆ CSL_pktdmaGetTxRT()

int32_t CSL_pktdmaGetTxRT ( const CSL_PktdmaCfg pCfg,
uint32_t  chanIdx,
CSL_PktdmaRT pRT 
)

Get a TX channel's real-time register values.

This function returns the real-time register values for the specified transmit channel.

Note that no parameter error checking is performed by this function for performance reasons.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] Index of the transmit channel
pRT[OUT] Pointer to a CSL_PktdmaRT structure where values are returned
Returns
CSL_PASS = Function executed successfully

◆ CSL_pktdmaSetRxRT()

int32_t CSL_pktdmaSetRxRT ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx,
const CSL_PktdmaRT pRT 
)

Set an RX channel's real-time register values.

This function sets the real-time register values for the specified receive channel.

Note that no parameter error checking is performed by this function for performance reasons.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] Index of the receive channel
pRT[IN] Pointer to a CSL_PktdmaRT structure containing initialization values
Returns
CSL_PASS = Function executed successfully

◆ CSL_pktdmaSetTxRT()

int32_t CSL_pktdmaSetTxRT ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx,
const CSL_PktdmaRT pRT 
)

Set a TX channel's real-time register values.

This function sets the real-time register values for the specified transmit channel.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] Index of the transmit channel
pRT[IN] Pointer to a CSL_PktdmaRT structure containing initialization values

Note that no parameter error checking is performed by this function for performance reasons.

Returns
CSL_PASS = Function executed successfully

◆ CSL_pktdmaEnableTxChan()

int32_t CSL_pktdmaEnableTxChan ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx 
)

Enable a transmit channel.

This function enables the transmit channel specified by 'chanIdx'.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] The index of the transmit channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_pktdmaDisableTxChan()

int32_t CSL_pktdmaDisableTxChan ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx 
)

Disable a transmit channel.

This function disables the transmit channel specified by 'chanIdx'.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] The index of the transmit channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_pktdmaTeardownTxChan()

int32_t CSL_pktdmaTeardownTxChan ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx,
bool  bForce,
bool  bWait 
)

Teardown a transmit channel.

This function tears down the transmit channel specified by 'chanIdx' at the next packet boundary.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] The index of the transmit channel
bForce[IN] If true, the channel is torn down without attempting to preserve data or wait for events (flushes the channel). If false, any packets in flight are completed prior to the channel being torn down.
bWait[IN] If true, wait for the teardown operation to complete. Otherwise, return immediately.
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (channel is disabled)

◆ CSL_pktdmaPauseTxChan()

int32_t CSL_pktdmaPauseTxChan ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx 
)

Pause a transmit channel.

This function pauses the transmit channel specified by 'chanIdx' at the next packet boundary. This is a more graceful method of halting processing than disabling the channel as it will not allow any current packets to underflow.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] The index of the transmit channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (channel is disabled)

◆ CSL_pktdmaUnpauseTxChan()

int32_t CSL_pktdmaUnpauseTxChan ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx 
)

Un-pause a transmit channel.

This function un-pauses the transmit channel specified by 'chanIdx'.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] The index of the transmit channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (channel is disabled)

◆ CSL_pktdmaTriggerTxChan()

int32_t CSL_pktdmaTriggerTxChan ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx 
)

[udmap_only] Send a trigger event to a TX channel

This function causes a trigger event to be sent to the specified transmit channel.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] Index of the transmit channel
Returns
CSL_EUNSUPPORTED_CMD = Function is not supported

◆ CSL_pktdmaClearTxChanError()

void CSL_pktdmaClearTxChanError ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx 
)

Clear error indication in a transmit channel.

This function clears the error indication in the specified transmit channel.

Note that no parameter error checking is performed by this function for performance reasons.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] The index of the transmit channel
Returns
None

◆ CSL_pktdmaEnableRxChan()

int32_t CSL_pktdmaEnableRxChan ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx 
)

Enable a receive channel.

This function enables the receive channel specified by 'chanIdx'.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] The index of the receive channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_pktdmaDisableRxChan()

int32_t CSL_pktdmaDisableRxChan ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx 
)

Disable a receive channel.

This function disables the receive channel specified by 'chanIdx'.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] The index of the receive channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_pktdmaTeardownRxChan()

int32_t CSL_pktdmaTeardownRxChan ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx,
bool  bForce,
bool  bWait 
)

Teardown a receive channel.

This function tears down the receive channel specified by 'chanIdx' at the next packet boundary.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] The index of the receive channel
bForce[IN] If true, the channel is torn down without attempting to preserve data or wait for events (flushes the channel). If false, any packets in flight are completed prior to the channel being torn down.
bWait[IN] If true, wait for the teardown operation to complete. Otherwise, return immediately.
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (channel is disabled)

◆ CSL_pktdmaPauseRxChan()

int32_t CSL_pktdmaPauseRxChan ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx 
)

Pause a receive channel.

This function pauses the receive channel specified by 'chanIdx' at the next packet boundary. This is a more graceful method of halting processing than disabling the channel as it will not allow any current packets to underflow.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] The index of the receive channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (channel is disabled)

◆ CSL_pktdmaUnpauseRxChan()

int32_t CSL_pktdmaUnpauseRxChan ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx 
)

Un-pause a receive channel.

This function un-pauses the receive channel specified by 'chanIdx'.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] The index of the transmit channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (channel is disabled)

◆ CSL_pktdmaTriggerRxChan()

int32_t CSL_pktdmaTriggerRxChan ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx 
)

[udmap_only] Send a trigger event to an RX channel

This function causes a trigger event to be sent to the specified receive channel.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] Index of the receive channel
Returns
CSL_EUNSUPPORTED_CMD = Function is not supported

◆ CSL_pktdmaClearRxChanError()

void CSL_pktdmaClearRxChanError ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx 
)

Clear error indication in a receive channel.

This function clears the error indication in the specified receive channel.

Note that no parameter error checking is performed by this function for performance reasons.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] The index of the receive channel
Returns
None

◆ CSL_pktdmaCfgRxFlowIdFirewall()

void CSL_pktdmaCfgRxFlowIdFirewall ( CSL_PktdmaCfg pCfg,
uint32_t  outEvtNum 
)

Configure the receive flow ID range firewall.

This function is used to configure the receive flow ID range firewall.

Note: This function is provided for backwards compatibility with the udmap CSL-FL.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
outEvtNum[IN] Output event number to use when the receive flow ID range firewall detects an error
Returns
None

◆ CSL_pktdmaGetRxFlowIdFirewallStatus()

bool CSL_pktdmaGetRxFlowIdFirewallStatus ( CSL_PktdmaCfg pCfg,
CSL_PktdmaRxFlowIdFirewallStatus pRxFlowIdFwStatus 
)

Get receive flow ID range firewall status information.

This function returns information from the receive flow ID range firewall.

If the receive flow ID firewall has detected an out of range flow ID, the function returns true and the fields within the CSL_PktdmaRxFlowIdFirewallStatus structure contain error details. The function will automatically reset the receive flow ID firewall to capture the next error.

If the receive flow ID firewall has not detected an out of range flow ID, the function returns false and the fields within the CSL_PktdmaRxFlowIdFirewallStatus structure are not updated.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
pRxFlowIdFwStatus[IN] Pointer to a CSL_PktdmaRxFlowIdFirewallStatus structure containing error details (valid only when true is returned)
Returns
true if the receive flow ID range firewall has detected an out of range flow ID, false if no error was detected

◆ CSL_pktdmaGetChanStats()

void CSL_pktdmaGetChanStats ( const CSL_PktdmaCfg pCfg,
uint32_t  chanIdx,
CSL_PktdmaChanDir  chanDir,
CSL_PktdmaChanStats pChanStats 
)

Get channel statistics.

This function is used to read statistics for a transmit or receive channel.

Note that no parameter error checking is performed by this function for performance reasons.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] Index of the channel
chanDir[IN] Channel direction (see CSL_PktdmaChanDir)
pChanStats[OUT] Pointer to a CSL_PktdmaChanStats structure where the statistics are returned
Returns
None

◆ CSL_pktdmaDecChanStats()

void CSL_pktdmaDecChanStats ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx,
CSL_PktdmaChanDir  chanDir,
const CSL_PktdmaChanStats pChanStats 
)

Decrement channel statistics.

Note that no parameter error checking is performed by this function for performance reasons.

This function is used to decrement statistics for a transmit or receive channel by the counts contained in the specified CSL_PktdmaChanStats structure.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] Index of the channel
chanDir[IN] Channel direction (see CSL_PktdmaChanDir)
pChanStats[IN] Pointer to a CSL_PktdmaChanStats structure containing the counts to decrement each statistic by
Returns
None

◆ CSL_pktdmaGetChanPeerReg()

int32_t CSL_pktdmaGetChanPeerReg ( const CSL_PktdmaCfg pCfg,
uint32_t  chanIdx,
CSL_PktdmaChanDir  chanDir,
uint32_t  regIdx,
uint32_t *  pVal 
)

Read a channel peer register.

This function is used to read the value from a peer register for the specified channel.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] Index of the channel
chanDir[IN] Channel direction (see CSL_PktdmaChanDir)
regIdx[IN] Peer register index (0..15)
pVal[OUT] Pointer where the register value is returned
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (regIdx is out of range)

◆ CSL_pktdmaSetChanPeerReg()

int32_t CSL_pktdmaSetChanPeerReg ( const CSL_PktdmaCfg pCfg,
uint32_t  chanIdx,
CSL_PktdmaChanDir  chanDir,
uint32_t  regIdx,
uint32_t *  pVal 
)

Write a channel peer register.

This function is used to write a value to a peer register for the specified transmit channel.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] Index of the transmit channel
chanDir[IN] Channel direction (see CSL_PktdmaChanDir)
regIdx[IN] Peer register index (0..15)
pVal[IN] Pointer to the register value to be written
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (regIdx is out of range)

◆ CSL_pktdmaEnableLink()

int32_t CSL_pktdmaEnableLink ( CSL_PktdmaCfg pCfg,
uint32_t  chanIdx,
CSL_PktdmaChanDir  chanDir 
)

Enable a directional data flow for a paired link.

This function is used to enable a directional data flow for a given PKTDMA channel between PKTDMA and a paired PSIL peer.

Parameters
pCfg[IN] Pointer to the PKTDMA configuration structure
chanIdx[IN] Index of the PKTDMA channel (TX or RX)
chanDir[IN] Channel direction (TX or RX, see CSL_PktdmaChanDir)
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (chanIdx is invalid)