PDK Documentation
CPSW Data Path Header

Introduction

CPSW DMA submodule provides a API layer which allows applications to set up the UDMA peripheral to control the flow of packet data to/from the core from/to CPSW. CPSW DMA module is used to for

  1. Configuration of receive UDMA channel & flow for enabling reception of Ethernet packets matching the application criteria Ex - OUI, Ether Type, IPv4 SA/DA.
  2. Configuration of transmit UDMA channel for enabling transmit of Ethernet packets

The application using CPSW DMA submodule need to allocate memories for different DMA data structures like ring memories, host packet descriptors and packet buffer memories.

Sub Modules

 CPSW DMA Configuration Definitions
 
 CPSW DMA Packet Utils
 
 CPSW_CONFIG_DEFINTIONS
 
 Packet Definitions
 
 Packet stats Definitions
 

Files

file  cpsw_dma.h
 This file contains the structure definitions and function prototypes of the CPSW Data/DMA path set up.
 

Functions

void CpswDma_initRxFlowParams (CpswDma_OpenRxFlowPrms *pRxFlowPrm)
 CpswDma_OpenRxFlowPrms structure init function. More...
 
void CpswDma_initTxChParams (CpswDma_OpenTxChPrms *pTxChCfg)
 CpswDma_OpenTxChPrms structure init function. More...
 
void CpswDma_pktInfoInit (CpswDma_PktInfo *pktInfo)
 CpswDma_PktInfo structure init function. More...
 
CpswDma_RxFlowHandle CpswDma_openRxFlow (CpswDma_OpenRxFlowPrms *pRxFlowPrms)
 CPSW DMA open Rx flow. More...
 
int32_t CpswDma_closeRxFlow (CpswDma_RxFlowHandle hRxFlow, CpswDma_PktInfoQ *pFqPktInfoQ, CpswDma_PktInfoQ *pCqPktInfoQ)
 CPSW DMA close Rx flow. More...
 
CpswDma_TxChHandle CpswDma_openTxCh (CpswDma_OpenTxChPrms *pTxChCfg)
 CPSW DMA open TX Channel. More...
 
int32_t CpswDma_closeTxCh (CpswDma_TxChHandle txChHandle, CpswDma_PktInfoQ *pFqPktInfoQ, CpswDma_PktInfoQ *pCqPktInfoQ)
 CPSW DMA close TX channel. More...
 
int32_t CpswDma_enableTxEvent (CpswDma_TxChHandle txChHandle)
 Enable TX channel ring event. More...
 
int32_t CpswDma_disableTxEvent (CpswDma_TxChHandle txChHandle)
 Disable TX channel ring event. More...
 
int32_t CpswDma_enableRxEvent (CpswDma_RxFlowHandle hRxFlow)
 Enable RX Flow ring event. More...
 
int32_t CpswDma_disableRxEvent (CpswDma_RxFlowHandle hRxFlow)
 Disable RX Flow ring event. More...
 
int32_t CpswDma_retrieveRxPackets (CpswDma_RxFlowHandle hRxFlow, CpswDma_PktInfoQ *pFromFlowQueue)
 RX Flow Retrieve ready(full) packet queue API. More...
 
int32_t CpswDma_submitRxPackets (CpswDma_RxFlowHandle hRxFlow, CpswDma_PktInfoQ *pToFlowQueue, CpswDma_PktInfoQ *pUnUsedPktQueue)
 RX Flow Submit free packet queue API. More...
 
int32_t CpswDma_retrieveTxDonePackets (CpswDma_TxChHandle hTxCh, CpswDma_PktInfoQ *pFromTxChQueue)
 TX channel Retrieve ready(empty) packet queue API. More...
 
int32_t CpswDma_submitTxReadyPackets (CpswDma_TxChHandle hTxCh, CpswDma_PktInfoQ *pToTxChQueue, CpswDma_PktInfoQ *pUnUsedPktQueue)
 TX channel Submit Ready(full) packet queue API. More...
 
int32_t CpswDma_checkRxFlowSanity (CpswDma_RxFlowHandle hRxFlow, uint32_t margin)
 API to check if any packet loss in RX flow FQ and CQ rings. More...
 
int32_t CpswDma_checkTxChSanity (CpswDma_TxChHandle hTxCh, uint32_t margin)
 API to check if any packet loss in TX Channel FQ and CQ rings. More...
 
int32_t CpswDma_getRxFlowStats (CpswDma_RxFlowHandle hRxFlow, CpswDma_RxFlowStats *rxFlowStats)
 Get RX flow statistics API. More...
 
int32_t CpswDma_getTxChStats (CpswDma_TxChHandle hTxCh, CpswDma_TxChStats *txChStats)
 Get TX Channel statistics API. More...
 
int32_t CpswDma_resetRxFlowStats (CpswDma_RxFlowHandle hRxFlow)
 Reset RX flow statistics API. More...
 
int32_t CpswDma_resetTxChStats (CpswDma_TxChHandle hTxCh)
 Reset TX Channel statistics API. More...
 
void CpswDma_initDataPathParams (CpswDma_DataPathConfig *pDmaConfig)
 Set default data path params. More...
 
CpswDma_Handle CpswDma_initDataPath (Cpsw_Type cpswType, const CpswDma_DataPathConfig *pCpswDmaDataPathConfig)
 Init Data Path. More...
 
int32_t CpswDma_deInitDataPath (CpswDma_Handle hCpswDma)
 DeInit Data Path. More...
 

CPSW Error Codes

Error codes returned by CPSW DMA functions

#define CPSW_DMA_S_SUCCESS   ((uint32_t)0x00000000U)
 
#define CPSW_DMA_E_FAILURE   ((uint32_t)0xFFFFFFFFU)
 
#define CPSW_DMA_E_NO_RX_FLOWS_AVAILABLE   ((uint32_t)0x00000003U)
 
#define CPSW_DMA_E_NO_TX_CHANNELS_AVAILABLE   ((uint32_t)0x00000004U)
 
#define CPSW_DMA_E_CHANNEL_NOT_OPEN   ((uint32_t)0x00000005U)
 
#define CPSW_DMA_E_INVALID_PARAM   ((uint32_t)0x00000006U)
 

CPSW DMA Instance configuration

Configuration macros for CPSW DMA module

#define CPSW_DMA_MAX_TX_CH   (8U)
 
#define CPSW_DMA_MAX_RX_FLOW   (64U)
 
#define CPSW_DMA_MAX_RX_FREE_QUEUE   (4U)
 
#define CPSW_DMA_HPD_SIZE   (128U)
 
#define CPSW_DMA_EXTENDED_PKT_INFO_BLOCK_SIZE   (16U)
 
#define CPSW_DMA_PROTOCOL_SPECIFIC_INFO_BLOCK_SIZE   (16U)
 
#define CPSW_DMA_PKT_DESC_RESERVED_SIZE
 
#define CPSW_DMA_RING_MEM_SIZE   (sizeof(uint64_t))
 
#define CPSW_DMA_RXFLOWIDX_INVALID   (0xABCDABCDU)
 

CPSW DMA Statistics configuration

No. of latest entries kept in the statistics

#define CPSW_DMA_STATS_HISTORY_CNT   ((uint32_t)32U)
 

CPSW DMA driver opaque handles

Opaque handle typedefs for CPSW DMA driver objects.

typedef struct CpswDma_RxFlowObj_s * CpswDma_RxFlowHandle
 Opaque structure to hold software state for CPSW DMA RX flow. More...
 
typedef struct CpswDma_TxChObj_s * CpswDma_TxChHandle
 Opaque structure to hold software state for CPSW TX DMA channel. More...
 
typedef struct CpswDma_PktInfo_s * CpswDma_PktHandle
 Opaque structure to hold software state for CPSW Packet Info. More...
 

CPSW DMA driver Callback function types

Callback function typedefs so that the CpswDma layer can call into the app layer and let it translate between the hardware packet descriptors and packets and the stack/translation layer's buffers and packets.

typedef uint8_t *(* CpswDma_AllocRingMemFxn) (void *appPriv, uint32_t numRingEle, uint32_t alignSize)
 
typedef void(* CpswDma_FreeRingMemFxn) (void *appPriv, void *pRingMem, uint32_t numRingEle)
 
typedef struct CpswDma_DmaDesc_s *(* CpswDma_AllocDmaDesccFxn) (void *appPriv, uint32_t alignSize)
 
typedef void(* CpswDma_FreeDmaDescFxn) (void *appPriv, struct CpswDma_DmaDesc_s *dmaDescPtr)
 
typedef void(* CpswDma_PktNotifyCb) (void *hCbArg)
 

Macro Definition Documentation

◆ CPSW_DMA_S_SUCCESS

#define CPSW_DMA_S_SUCCESS   ((uint32_t)0x00000000U)

◆ CPSW_DMA_E_FAILURE

#define CPSW_DMA_E_FAILURE   ((uint32_t)0xFFFFFFFFU)

◆ CPSW_DMA_E_NO_RX_FLOWS_AVAILABLE

#define CPSW_DMA_E_NO_RX_FLOWS_AVAILABLE   ((uint32_t)0x00000003U)

◆ CPSW_DMA_E_NO_TX_CHANNELS_AVAILABLE

#define CPSW_DMA_E_NO_TX_CHANNELS_AVAILABLE   ((uint32_t)0x00000004U)

◆ CPSW_DMA_E_CHANNEL_NOT_OPEN

#define CPSW_DMA_E_CHANNEL_NOT_OPEN   ((uint32_t)0x00000005U)

◆ CPSW_DMA_E_INVALID_PARAM

#define CPSW_DMA_E_INVALID_PARAM   ((uint32_t)0x00000006U)

◆ CPSW_DMA_MAX_TX_CH

#define CPSW_DMA_MAX_TX_CH   (8U)

Maximum number of CPSW TX DMA channels

◆ CPSW_DMA_MAX_RX_FLOW

#define CPSW_DMA_MAX_RX_FLOW   (64U)

Maximum number of CPSW RX FLOWS channels

◆ CPSW_DMA_MAX_RX_FREE_QUEUE

#define CPSW_DMA_MAX_RX_FREE_QUEUE   (4U)

Max. number for Rx free queues for CPSW RX DMA flow

◆ CPSW_DMA_HPD_SIZE

#define CPSW_DMA_HPD_SIZE   (128U)

CPSW DMA HPD packet size

◆ CPSW_DMA_EXTENDED_PKT_INFO_BLOCK_SIZE

#define CPSW_DMA_EXTENDED_PKT_INFO_BLOCK_SIZE   (16U)

Extended Packet Info Block size

◆ CPSW_DMA_PROTOCOL_SPECIFIC_INFO_BLOCK_SIZE

#define CPSW_DMA_PROTOCOL_SPECIFIC_INFO_BLOCK_SIZE   (16U)

Extended Packet Info Block size

◆ CPSW_DMA_PKT_DESC_RESERVED_SIZE

#define CPSW_DMA_PKT_DESC_RESERVED_SIZE
Value:
sizeof(CSL_UdmapCppi5HMPD) - \
CPSW_DMA_PROTOCOL_SPECIFIC_INFO_BLOCK_SIZE))
#define CPSW_DMA_EXTENDED_PKT_INFO_BLOCK_SIZE
Definition: cpsw_dma.h:109
Host-mode packet and buffer descriptor.
Definition: csl_udmap_cppi5.h:100
#define CPSW_DMA_HPD_SIZE
Definition: cpsw_dma.h:106

Extended Packet Info Block size

◆ CPSW_DMA_RING_MEM_SIZE

#define CPSW_DMA_RING_MEM_SIZE   (sizeof(uint64_t))

CPSW DMA Desc size - this is used by applications to allocate DMA desc memory

◆ CPSW_DMA_RXFLOWIDX_INVALID

#define CPSW_DMA_RXFLOWIDX_INVALID   (0xABCDABCDU)

CPSW DMA Invalid RX flow id

◆ CPSW_DMA_STATS_HISTORY_CNT

#define CPSW_DMA_STATS_HISTORY_CNT   ((uint32_t)32U)

Typedef Documentation

◆ CpswDma_RxFlowHandle

typedef struct CpswDma_RxFlowObj_s* CpswDma_RxFlowHandle

Opaque structure to hold software state for CPSW DMA RX flow.

◆ CpswDma_TxChHandle

typedef struct CpswDma_TxChObj_s* CpswDma_TxChHandle

Opaque structure to hold software state for CPSW TX DMA channel.

◆ CpswDma_PktHandle

typedef struct CpswDma_PktInfo_s* CpswDma_PktHandle

Opaque structure to hold software state for CPSW Packet Info.

◆ CpswDma_AllocRingMemFxn

typedef uint8_t*(* CpswDma_AllocRingMemFxn) (void *appPriv, uint32_t numRingEle, uint32_t alignSize)

Function pointer type for DMAC packet allocation function

◆ CpswDma_FreeRingMemFxn

typedef void(* CpswDma_FreeRingMemFxn) (void *appPriv, void *pRingMem, uint32_t numRingEle)

Function pointer type for DMAC packet free function

◆ CpswDma_AllocDmaDesccFxn

typedef struct CpswDma_DmaDesc_s*(* CpswDma_AllocDmaDesccFxn) (void *appPriv, uint32_t alignSize)

Function pointer type for DMAC packet allocation function

◆ CpswDma_FreeDmaDescFxn

typedef void(* CpswDma_FreeDmaDescFxn) (void *appPriv, struct CpswDma_DmaDesc_s *dmaDescPtr)

Function pointer type for DMAC packet free function

◆ CpswDma_PktNotifyCb

typedef void(* CpswDma_PktNotifyCb) (void *hCbArg)

Function pointer type for packet notify call back. This is called by driver when packet is received on the Rx flow or transmission completed from Tx channel.

Function Documentation

◆ CpswDma_initRxFlowParams()

void CpswDma_initRxFlowParams ( CpswDma_OpenRxFlowPrms pRxFlowPrm)

CpswDma_OpenRxFlowPrms structure init function.

Parameters
pRxFlowPrm[IN] Pointer to CpswDma_OpenRxFlowPrms structure.

◆ CpswDma_initTxChParams()

void CpswDma_initTxChParams ( CpswDma_OpenTxChPrms pTxChCfg)

CpswDma_OpenTxChPrms structure init function.

Parameters
pTxChCfg[IN] Pointer to CpswDma_OpenTxChPrms structure.

◆ CpswDma_pktInfoInit()

void CpswDma_pktInfoInit ( CpswDma_PktInfo pktInfo)

CpswDma_PktInfo structure init function.

Parameters
pktInfo[IN] Pointer to CpswDma_PktInfo structure.

◆ CpswDma_openRxFlow()

CpswDma_RxFlowHandle CpswDma_openRxFlow ( CpswDma_OpenRxFlowPrms pRxFlowPrms)

CPSW DMA open Rx flow.

Opens the CPSW DMA RX flow based on the flow parameters. This function attaches flow using flowIdx provided in CpswDma_OpenRxFlowPrms and configures the UDMA flow. This also configures event if notifyCb is not null

Requirement:

Parameters
pRxFlowPrms[IN] CPSW RX Flow parameters CpswDma_OpenRxFlowPrms. This parameter can't be NULL.
Returns
CpswDma_RxFlowHandle

◆ CpswDma_closeRxFlow()

int32_t CpswDma_closeRxFlow ( CpswDma_RxFlowHandle  hRxFlow,
CpswDma_PktInfoQ pFqPktInfoQ,
CpswDma_PktInfoQ pCqPktInfoQ 
)

CPSW DMA close Rx flow.

Closes the CPSW DMA RX flow 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 CpswDma_retrieveRxPackets packets call) and return those to app. App doesn't need to call CpswDma_retrieveRxPackets explicitly to retrieve these packets

Requirement:

Parameters
hRxFlow[IN] CPSW DMA flow handle. This parameter can't be NULL.
pFqPktInfoQ[OUT] Pointer to CpswDma_PktInfoQ structure where packets from FQ (submitted for reception) are retrieved and returned to application. This parameter can't be NULL.
pCqPktInfoQ[OUT] Pointer to CpswDma_PktInfoQ structure where packets from CQ (received packets) are retrieved and returned to application. This parameter can't be NULL.
Returns
Udma_ErrorCodes

◆ CpswDma_openTxCh()

CpswDma_TxChHandle CpswDma_openTxCh ( CpswDma_OpenTxChPrms pTxChCfg)

CPSW DMA open TX Channel.

Opens the CPSW TX UDMA channel based on the channel parameters. This function open TX channel using chNum provided in CpswDma_OpenTxChPrms and configures TX channel. This also configures event if notifyCb is not null

Requirement:

Parameters
pTxChCfg[IN] CPSW TX channel parameters CpswDma_OpenTxChPrms. This parameter can't be NULL.
Returns
CpswDma_TxChHandle

◆ CpswDma_closeTxCh()

int32_t CpswDma_closeTxCh ( CpswDma_TxChHandle  txChHandle,
CpswDma_PktInfoQ pFqPktInfoQ,
CpswDma_PktInfoQ pCqPktInfoQ 
)

CPSW DMA close TX channel.

Closes the CPSW 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 CpswDma_retrieveTxDonePackets explicitly to retrieve these packets

Requirement:

Parameters
txChHandle[IN] CPSW DMA TX Channel handle. This parameter can't be NULL.
pFqPktInfoQ[OUT] Pointer to CpswDma_PktInfoQ structure where packets from FQ (submitted but not transmitted) are retrieved and returned to application. This parameter can't be NULL.
pCqPktInfoQ[OUT] Pointer to CpswDma_PktInfoQ structure where packets from CQ (transmission completed) are retrieved and returned to application. This parameter can't be NULL.
Returns
Udma_ErrorCodes

◆ CpswDma_enableTxEvent()

int32_t CpswDma_enableTxEvent ( CpswDma_TxChHandle  txChHandle)

Enable TX channel ring event.

Enables the ring completion event for TX channel. This allows application to run time control ring events and retrieve packet once to do burst packet processing.

Parameters
txChHandle[IN] Handle to CPSW DMA TX channel
Returns
Udma_ErrorCodes

◆ CpswDma_disableTxEvent()

int32_t CpswDma_disableTxEvent ( CpswDma_TxChHandle  txChHandle)

Disable TX channel ring event.

Disable the ring completion event for TX channel. This allows application to run time control ring events and retrieve packet once.

Parameters
txChHandle[IN] Handle to CPSW DMA TX channel
Returns
Udma_ErrorCodes

◆ CpswDma_enableRxEvent()

int32_t CpswDma_enableRxEvent ( CpswDma_RxFlowHandle  hRxFlow)

Enable RX Flow ring event.

Enables the ring completion event for RX Flow. This allows application to run time control ring events and retrieve packet once to do burst packet processing.

Parameters
hRxFlow[IN] Handle to CPSW DMA RX Flow
Returns
Udma_ErrorCodes

◆ CpswDma_disableRxEvent()

int32_t CpswDma_disableRxEvent ( CpswDma_RxFlowHandle  hRxFlow)

Disable RX Flow ring event.

Disable the ring completion event for RX Flow. This allows application to run time control ring events and retrieve packet once.

Parameters
hRxFlow[IN] Handle to CPSW DMA RX Flow
Returns
Udma_ErrorCodes

◆ CpswDma_retrieveRxPackets()

int32_t CpswDma_retrieveRxPackets ( CpswDma_RxFlowHandle  hRxFlow,
CpswDma_PktInfoQ pFromFlowQueue 
)

RX Flow Retrieve ready(full) packet queue API.

Parameters
hRxFlow[IN] flow handle for the flow we wish to retrieve packets from.
pFromFlowQueue[OUT] Pointer to CpswDma_PktInfoQ structure where packets from hardware are retrieved and returned to application.
Returns
Udma_ErrorCodes

◆ CpswDma_submitRxPackets()

int32_t CpswDma_submitRxPackets ( CpswDma_RxFlowHandle  hRxFlow,
CpswDma_PktInfoQ pToFlowQueue,
CpswDma_PktInfoQ pUnUsedPktQueue 
)

RX Flow Submit free packet queue API.

Parameters
hRxFlow[IN] flow handle for the flow we wish to submit packets to.
pToFlowQueue[OUT] Pointer to CpswDma_PktInfoQ structure containing packets to be submitted to flow.
pUnUsedPktQueue[OUT] Pointer to CpswDma_PktInfoQ structure. This Q is used by driver to return packets for which it couldn't allocate the DMA descriptors.
Returns
Udma_ErrorCodes

◆ CpswDma_retrieveTxDonePackets()

int32_t CpswDma_retrieveTxDonePackets ( CpswDma_TxChHandle  hTxCh,
CpswDma_PktInfoQ pFromTxChQueue 
)

TX channel Retrieve ready(empty) packet queue API.

Parameters
hTxCh[IN] CPSW DMA TX channel handle for the TX Channel we wish to retrieve packets from.
pFromTxChQueue[OUT] Pointer to CpswDma_PktInfoQ structure where packets from hardware are retrieved and returned to application.
Returns
Udma_ErrorCodes

◆ CpswDma_submitTxReadyPackets()

int32_t CpswDma_submitTxReadyPackets ( CpswDma_TxChHandle  hTxCh,
CpswDma_PktInfoQ pToTxChQueue,
CpswDma_PktInfoQ pUnUsedPktQueue 
)

TX channel Submit Ready(full) packet queue API.

Parameters
hTxCh[IN] TX Channel handle for the TX channel we wish to submit packets to.
pToTxChQueue[OUT] Pointer to CpswDma_PktInfoQ structure containing packets to be submitted to TX Channel.
pUnUsedPktQueue[OUT] Pointer to CpswDma_PktInfoQ structure. This Q is used by driver to return packets for which it couldn't allocate the DMA descriptors.
Returns
Udma_ErrorCodes

◆ CpswDma_checkRxFlowSanity()

int32_t CpswDma_checkRxFlowSanity ( CpswDma_RxFlowHandle  hRxFlow,
uint32_t  margin 
)

API to check if any packet loss in RX flow 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 no. of allocated with some "margin" for packets in flight.

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.
Returns
UDMA_SOK - No.of free descriptors and with DMA matches (total allocated packets - margin) = (packets in CQ + Packets in FQ)
UDMA_EFAIL - No.of free descriptors and with DMA don't match

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.

◆ CpswDma_checkTxChSanity()

int32_t CpswDma_checkTxChSanity ( CpswDma_TxChHandle  hTxCh,
uint32_t  margin 
)

API to 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 no. of allocated with some "margin" for packets in flight.

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.
Returns
UDMA_SOK - No.of free descriptors and with DMA matches (total allocated packets - margin) = (packets in CQ + Packets in FQ)
UDMA_EFAIL - No.of free descriptors and with DMA don't match

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.

◆ CpswDma_getRxFlowStats()

int32_t CpswDma_getRxFlowStats ( CpswDma_RxFlowHandle  hRxFlow,
CpswDma_RxFlowStats rxFlowStats 
)

Get RX flow statistics API.

Parameters
hRxFlow[IN] RX flow handle.
rxFlowStats[INOUT] Pointer to RX Flow stats object where stats would be returned
Returns
CPSW_SOK - Stats are enabled and supported
CPSW_ENOTSUPPORTED - Stats is not supported (enabled)

◆ CpswDma_getTxChStats()

int32_t CpswDma_getTxChStats ( CpswDma_TxChHandle  hTxCh,
CpswDma_TxChStats txChStats 
)

Get TX Channel statistics API.

Parameters
hTxCh[IN] TX Channel handle
txChStats[INOUT] Pointer to TX Channel stats object where stats would be returned
Returns
CPSW_SOK - Stats are enabled and supported
CPSW_ENOTSUPPORTED - Stats is not supported (enabled)

◆ CpswDma_resetRxFlowStats()

int32_t CpswDma_resetRxFlowStats ( CpswDma_RxFlowHandle  hRxFlow)

Reset RX flow statistics API.

Parameters
hRxFlow[IN] RX flow handle.
Returns
CPSW_SOK - Stats are enabled and supported
CPSW_ENOTSUPPORTED - Stats is not supported (enabled)

◆ CpswDma_resetTxChStats()

int32_t CpswDma_resetTxChStats ( CpswDma_TxChHandle  hTxCh)

Reset TX Channel statistics API.

Parameters
hTxCh[IN] TX Channel handle
Returns
CPSW_SOK - Stats are enabled and supported
CPSW_ENOTSUPPORTED - Stats is not supported (enabled)

◆ CpswDma_initDataPathParams()

void CpswDma_initDataPathParams ( CpswDma_DataPathConfig pDmaConfig)

Set default data path params.

Parameters
pDmaConfig[IN] Data Path Config structure to be initialized

◆ CpswDma_initDataPath()

CpswDma_Handle CpswDma_initDataPath ( Cpsw_Type  cpswType,
const CpswDma_DataPathConfig pCpswDmaDataPathConfig 
)

Init Data Path.

Init Dma data path state on remote core

Parameters
cpswType[IN] Cpsw Type
pCpswDmaDataPathConfig[IN] Data Path Init params
Returns
CpswDma_Handle

◆ CpswDma_deInitDataPath()

int32_t CpswDma_deInitDataPath ( CpswDma_Handle  hCpswDma)

DeInit Data Path.

DeInit Dma data path state on remote core

Parameters
hCpswDma[IN] Cpsw DMA Handle
Returns
CpswDma_Handle