This group contains structure and type definitions needed to properly construct the Enet UDMA configuration structure which is part of the top-level Enet UDMA configuration structure.
|
| void | EnetUdma_initDataPathParams (EnetDma_initCfg *pDmaConfig) |
| |
| void | EnetUdma_initRxFlowParams (EnetUdma_OpenRxFlowPrms *pRxFlowPrms) |
| | Initialize RX channel open parameters. More...
|
| |
| EnetDma_RxChHandle | EnetUdma_openRxFlow (EnetDma_Handle hDma, const EnetUdma_OpenRxFlowPrms *pRxFlowPrms) |
| | Enet DMA open RX channel. More...
|
| |
| int32_t | EnetUdma_closeRxFlow (EnetDma_RxChHandle hRxCh, EnetDma_PktQ *fq, EnetDma_PktQ *cq) |
| | Enet DMA close RX channel. More...
|
| |
| void | EnetUdma_initTxChParams (EnetUdma_OpenTxChPrms *pTxChPrms) |
| | Initialize TX channel open parameters. More...
|
| |
| EnetDma_TxChHandle | EnetUdma_openTxCh (EnetDma_Handle hDma, const EnetUdma_OpenTxChPrms *pTxChPrms) |
| | Enet DMA open TX channel. More...
|
| |
| int32_t | EnetUdma_closeTxCh (EnetDma_TxChHandle hTxCh, EnetDma_PktQ *fq, EnetDma_PktQ *cq) |
| | Enet DMA close TX channel. More...
|
| |
| EnetDma_Handle | EnetUdma_initDataPath (Enet_Type enetType, uint32_t instId, const EnetDma_initCfg *pDmaInitCfg) |
| |
| int32_t | EnetUdma_deInitDataPath (EnetDma_Handle hEnetUdma) |
| |
| int32_t | EnetUdma_checkRxFlowSanity (EnetDma_RxChHandle hRxFlow, uint32_t margin) |
| | Check if any packet loss in RX flow FQ and CQ rings. More...
|
| |
| int32_t | EnetUdma_checkTxChSanity (EnetDma_TxChHandle hTxCh, uint32_t margin) |
| | Check if any packet loss in TX Channel FQ and CQ rings. More...
|
| |
| Udma_RingHandle | EnetUdma_getTxChFqHandle (EnetDma_TxChHandle hTxCh) |
| | Get TX channel FQ handle. More...
|
| |
| EnetUdma_DmaDescQHandle | EnetUdma_getTxChDescPoolHandle (EnetDma_TxChHandle hTxCh) |
| | Get handle to DMA descriptor free pool for TX channel. More...
|
| |
| Udma_RingHandle | EnetUdma_getRxFlowFqHandle (EnetDma_RxChHandle hRxFlow) |
| | Get RX flow FQ handle. More...
|
| |
| EnetUdma_DmaDescQHandle | EnetUdma_getRxFlowDescPoolHandle (EnetDma_RxChHandle hRxFlow) |
| | Get handle to DMA descriptor free pool for RX flow. More...
|
| |
◆ EnetDma_OpenRxChPrms
Param struct for the RX channel open function. We include this typedef as top level DMA APIs use EnetDma_OpenRxChPrms struct.
◆ EnetUdma_initDataPathParams()
◆ EnetUdma_initRxFlowParams()
Initialize RX channel open parameters.
Initializes RX channel parameters with default values. Refer to SOC DMA specific RX channel config structure for specific config details.
- Parameters
-
| pRxFlowPrms | RX channel configuration parameters. |
◆ EnetUdma_openRxFlow()
Enet DMA open RX channel.
Opens the Enet DMA RX channel based on the channel parameters. This function configures the DMA channel. This also configures event if notifyCb is not null. Refer to SOC DMA specific RX channel config structure for specific config details.
Enet DMA is peripheral-aware as peripherals in a given SoC may need different handling, i.e. DMA descriptor's extra fields having different meaning for two peripherals using same DMA engine. This peripheral-awareness is given to the RX channel/flow via EnetDma_Handle passed at open time.
- Parameters
-
| hDma | Enet DMA handle |
| pRxFlowPrms | RX channel configuration parameters. This parameter can't be NULL. |
- Returns
- RX channel opaque handle if opened. Otherwise, NULL.
◆ EnetUdma_closeRxFlow()
Enet DMA close RX channel.
Closes the Enet DMA RX channel and frees all associated resources. During close operation, we flush FQ taking all DMA descriptors with packet submitted in advance for reception and return to app. Also we retrieve all packets from the CQ (packets received between last EnetDma_retrieveRxPktQ() function call) and return those to app. App doesn't need to call function EnetDma_retrieveRxPktQ() explicitly to retrieve these packets.
- Parameters
-
| hRxCh | [IN] Enet DMA channel handle. This parameter can't be NULL. |
| fq | [OUT] Pointer to EnetDma_PktQ structure where packets from FQ (submitted for reception) are retrieved and returned to application. This parameter can't be NULL. |
| cq | [OUT] Pointer to EnetDma_PktQ structure where packets from CQ (received packets) are retrieved and returned to application. This parameter can't be NULL. |
- Returns
- Enet_ErrorCodes
◆ EnetUdma_initTxChParams()
Initialize TX channel open parameters.
Initializes TX channel open parameters with default values. Refer to SOC DMA specific RX channel config structure for specific config details.
- Parameters
-
| pTxChPrms | TX channel configuration parameters. |
◆ EnetUdma_openTxCh()
Enet DMA open TX channel.
Opens the DMA TX DMA channel based on the channel parameters. This function open TX channel using chNum provided in EnetDma_OpenTxChPrms() and configures TX channel. This also configures event if notifyCb is not null. Refer to SOC DMA specific RX channel config structure for specific config details.
Enet DMA is peripheral-aware as peripherals in a given SoC may need different handling, i.e. DMA descriptor's extra fields having different meaning for two peripherals using same DMA engine. This peripheral-awareness is given to the TX channel via EnetDma_Handle passed at open time.
- Parameters
-
| hDma | Enet DMA handle |
| pTxChPrms | TX channel configuration parameters. This parameter can't be NULL. |
- Returns
- TX channel opaque handle if opened. Otherwise, NULL.
◆ EnetUdma_closeTxCh()
Enet DMA close TX channel.
Closes the Enet DMA TX channel and frees all associated resources. During close operation, we flush FQ taking all DMA descriptors with packet submitted but not yet transmitted and return to app. Also we retrieve all packets from the CQ (transmission completed packets) and return those to app. App doesn't need to call EnetDma_retrieveTxPktQ() explicitly to retrieve these packets.
- Parameters
-
| hTxCh | [IN] Enet DMA TX Channel handle. This parameter can't be NULL. |
| fq | [OUT] Pointer to EnetDma_PktQ structure where packets from FQ (TX ready - submitted for transmission) are retrieved and returned to application. This parameter can't be NULL. |
| cq | [OUT] Pointer to EnetDma_PktQ structure where packets from CQ (TX free - transmitted packets) are retrieved and returned to application. This parameter can't be NULL. |
- Returns
- Enet_ErrorCodes
◆ EnetUdma_initDataPath()
◆ EnetUdma_deInitDataPath()
◆ EnetUdma_checkRxFlowSanity()
Check if any packet loss in RX flow FQ and CQ rings.
This development time error checks API checks DMA descriptor loss due to any timing issues. We check amount of descriptors with DMA and free matches the number of allocated with some "margin" for packets in flight.
Note: Margin can vary drastically based on Core (A72 vs R5), type of Udma channel (NORMAL/HC etc.) and size of packet. This makes these API dependent on application configuration.
- Parameters
-
| hRxFlow | [IN] flow handle for the flow we wish to check sanity |
| margin | [IN] Amount of packets which can be in flight in DMA |
- Return values
-
| UDMA_SOK | Number of free descriptors and with DMA matches (total allocated packets - margin) = (packets in CQ + Packets in FQ) |
| UDMA_EFAIL | Number offree descriptors and with DMA don't match |
◆ EnetUdma_checkTxChSanity()
Check if any packet loss in TX Channel FQ and CQ rings.
This development time error checks API checks dma desc loss due to any timing issues. We check amount of descriptors with DMA and free matches the number of allocated with some "margin" for packets in flight.
Note: Margin can vary drastically based on Core (A72 vs R5), type of Udma channel (NORMAL/HC etc.) and size of packet. This makes these API dependent on application configuration.
- Parameters
-
| hTxCh | [IN] TX Channel handle for the TX channel we wish to check sanity |
| margin | [IN] Amount of packets which can be in flight in DMA |
- Return values
-
| UDMA_SOK | Number of free descriptors and with DMA matches (total allocated packets - margin) = (packets in CQ + Packets in FQ) |
| UDMA_EFAIL | Number of free descriptors and with DMA don't match |
◆ EnetUdma_getTxChFqHandle()
Get TX channel FQ handle.
Returns FQ handle for TX Channel. This function can be used when auto-recycling of buffers is used.
- Parameters
-
| hTxCh | [IN] TX Channel handle |
- Returns
- Udma_RingHandle - Handle to FQ ring
◆ EnetUdma_getTxChDescPoolHandle()
Get handle to DMA descriptor free pool for TX channel.
Returns DMA descriptor free pool for TX channel. This function can be used when auto-recycling of buffers is used.
- Parameters
-
| hTxCh | [IN] TX channel handle |
- Returns
- EnetUdma_DmaDescQHandle - Handle to DMA descriptor free pool
◆ EnetUdma_getRxFlowFqHandle()
Get RX flow FQ handle.
Returns FQ handle for RX flow. This function can be used when auto-recycling of buffers is used.
- Parameters
-
| hRxFlow | [IN] RX flow handle |
- Returns
- Udma_RingHandle - Handle to FQ ring
◆ EnetUdma_getRxFlowDescPoolHandle()
Get handle to DMA descriptor free pool for RX flow.
Returns DMA descriptor free pool for RX flow. This function can be used when auto-recycling of buffers is used.
- Parameters
-
| hRxFlow | [IN] RX flow handle |
- Returns
- EnetUdma_DmaDescQHandle - Handle to DMA descriptor free pool