AM64x MCU+ SDK  11.01.00
enet_udma.h File Reference

Introduction

This file contains the type definitions and helper macros for the Enet UDMA data path (DMA) interface.

Go to the source code of this file.

Data Structures

struct  EnetUdma_PktTsInfo
 CPPI buffer timestamp info. More...
 
struct  EnetUdma_SGListEntry
 Packet data structure. More...
 
struct  EnetUdma_SGList
 Transmit packet scatter list info. More...
 
struct  EnetUdma_PktInfo
 
struct  EnetUdma_CpswHpdDesc
 Enet UDMA descriptor format. More...
 
struct  EnetUdma_DmaDesc
 CPPI DMA descriptor. More...
 
struct  EnetUdma_DmaDesc::EnetUdma_HBDDesc_s
 
struct  EnetUdma_RingMonCfg
 UDMA ring monitor config parameters. More...
 
struct  EnetUdma_UdmaRingPrms
 Enet UDMA channel ring parameters. More...
 
struct  EnetUdma_UdmaChPrms
 Enet UDMA RX flow/TX channel ring configuration parameters. More...
 
struct  EnetUdma_UdmaFlowPrms
 UDMA RX channel flow parameters. More...
 
struct  EnetUdma_UdmaChTxPrms
 Enet UDMA TX channel parameters. More...
 
struct  EnetUdma_AutoReclaimPrms
 Enet UDMA channel/flow auto-reclaim config struct. More...
 
struct  EnetUdma_OpenRxFlowPrms
 Param struct for the get default flowId open parameters. More...
 
struct  EnetUdma_OpenTxChPrms
 Param struct for the TX channel open function. More...
 
struct  EnetUdma_RxChInitPrms
 Param struct for the RX channel open. More...
 
struct  EnetDma_Cfg
 Config structure for Enet UDMA. More...
 
struct  EnetDma_initCfg
 Config structure for Enet UDMA Data Path initialization. More...
 

Macros

Enet UDMA instance configuration

Configuration macros for Enet UDMA module.

#define ENET_UDMA_HPD_SIZE   (128U)
 Enet UDMA HPD packet size. More...
 
#define ENET_UDMA_EXTENDED_PKT_INFO_BLOCK_SIZE   (16U)
 Extended Packet Info Block size. More...
 
#define ENET_UDMA_PROTOCOL_SPECIFIC_INFO_BLOCK_SIZE   (16U)
 Extended Packet Info Block size. More...
 
#define ENET_UDMA_PKT_DESC_RESERVED_SIZE
 Extended Packet Info Block size. More...
 
#define ENET_UDMA_RING_MEM_SIZE   (sizeof(uint64_t))
 UDMA ring single element size. More...
 
#define ENET_UDMA_RXMTU_ALIGN   (1U << 5U)
 Enet UDMA RX MTU alignment. The RxFlow MTU must be aligned to this value. More...
 
#define ENET_UDMA_CPSW_MAX_SG_LIST   (4U)
 
#define ENET_UDMA_CPSW_HOSTPKTDESC_INDEX   (0U)
 Index of the Host Packet(first packet) descriptor. More...
 
#define ENET_UDMA_CPSW_HOSTBUFDESC_INDEX   (1U)
 Index of the first Host Buffer descriptor. More...
 
#define ENET_UDMA_CPSW_MAX_HOSTBUFDESC_COUNT   (ENET_UDMA_CPSW_MAX_SG_LIST - ENET_UDMA_CPSW_HOSTBUFDESC_INDEX)
 
#define ENET_UDMA_HPD_SRC_TAG_LOW_MASK   (0xFF)
 Source tag low mask of descriptor (used to get packet's received port number) More...
 
#define ENET_UDMA_DESC_ALIGNMENT   (64U)
 UDMA descriptor address alignment requirement. More...
 
#define ENET_UDMA_ICSSG_LRE_TX_OFFLOAD_DISABLE   (0U)
 ICSSG Disable TX Offload for LRE Mode (HSR/PRP) More...
 
#define ENET_UDMA_ICSSG_LRE_TX_OFFLOAD_ENABLE   (1U)
 ICSSG Enable TX Offload for LRE Mode (HSR/PRP) More...
 
#define ENET_UDMA_ICSSG_LRE_RX_OFFLOAD_DISABLE   (0U)
 ICSSG Disable RX Offload for LRE Mode (HSR/PRP) More...
 
#define ENET_UDMA_ICSSG_LRE_RX_OFFLOAD_ENABLE   (1U)
 ICSSG Enable RX Offload for LRE Mode (HSR/PRP) More...
 

Typedefs

typedef struct EnetUdma_DmaDescQ_s * EnetUdma_DmaDescQHandle
 Opaque handle to Enet UDMA descriptor queue. More...
 
typedef void(* EnetDma_PktNotifyCb) (void *cbArg)
 Function pointer type for packet notify call back. More...
 
typedef EnetQ EnetDma_PktQ
 Packet queue. More...
 
typedef EnetUdma_SGListEntry EnetDma_SGListEntry
 
typedef EnetUdma_OpenRxFlowPrms EnetDma_OpenRxChPrms
 Param struct for the RX channel open function. We include this typedef as top level DMA APIs use EnetDma_OpenRxChPrms struct. More...
 

Functions

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...
 

Typedef Documentation

◆ EnetDma_PktQ

Packet queue.

A queue of packets, which are used for managing the packets given to the DMA driver by an application. It can also be used by the translation or application layer to manage free packets pools.