|
AM243x MCU+ SDK
10.01.00
|
|
Go to the documentation of this file.
78 #define ENET_UDMA_HPD_SIZE (128U)
81 #define ENET_UDMA_EXTENDED_PKT_INFO_BLOCK_SIZE (16U)
84 #define ENET_UDMA_PROTOCOL_SPECIFIC_INFO_BLOCK_SIZE (16U)
87 #define ENET_UDMA_PKT_DESC_RESERVED_SIZE ( ENET_UDMA_HPD_SIZE - \
88 sizeof(CSL_UdmapCppi5HMPD) - \
89 (ENET_UDMA_EXTENDED_PKT_INFO_BLOCK_SIZE + \
90 ENET_UDMA_PROTOCOL_SPECIFIC_INFO_BLOCK_SIZE))
93 #define ENET_UDMA_RING_MEM_SIZE (sizeof(uint64_t))
110 #define ENET_UDMA_RXMTU_ALIGN (1U << 5U)
113 #define ENET_UDMA_CPSW_MAX_SG_LIST (4U)
116 #define ENET_UDMA_CPSW_HOSTPKTDESC_INDEX (0U)
119 #define ENET_UDMA_CPSW_HOSTBUFDESC_INDEX (1U)
122 #define ENET_UDMA_CPSW_MAX_HOSTBUFDESC_COUNT (ENET_UDMA_CPSW_MAX_SG_LIST - ENET_UDMA_CPSW_HOSTBUFDESC_INDEX)
125 #define ENET_UDMA_HPD_SRC_TAG_LOW_MASK (0xFF)
127 #if ((__ARM_ARCH == 7) && (__ARM_ARCH_PROFILE == 'R'))
129 #define ENETDMA_CACHELINE_ALIGNMENT (32U)
131 #define ENETDMA_CACHELINE_ALIGNMENT (64U)
133 #error "Enet library compilation not supported on non cortex R cores. Update correct cache line size"
137 #define ENET_UDMA_DESC_ALIGNMENT (64U)
161 typedef uint8_t *(*EnetUdma_AllocRingMemFxn)(
void *appPriv,
168 uint32_t numRingEle);
171 typedef struct EnetUdma_DmaDesc_s *(*EnetUdma_AllocDmaDescFxn)(
void *appPriv,
176 struct EnetUdma_DmaDesc_s *dmaDescPtr);
207 typedef struct EnetUdma_PktTsInfo_s
240 typedef struct EnetUdma_SGListEntry_s
276 typedef struct EnetUdma_SGList_s
287 typedef struct EnetUdma_PktInfo_s
375 typedef struct EnetUdma_CpswHpdDesc_s
410 typedef struct EnetUdma_DmaDesc_s
449 typedef struct EnetUdma_RingMonCfg_s
482 typedef struct EnetUdma_UdmaRingPrms_s
507 typedef struct EnetUdma_UdmaChPrms_s
509 #if (UDMA_SOC_CFG_UDMAP_PRESENT == 1)
523 typedef struct EnetUdma_UdmaFlowPrms_s
590 typedef struct EnetUdma_UdmaChTxPrms_s
633 typedef struct EnetUdma_AutoReclaimPrms_s
667 typedef struct EnetUdma_OpenRxFlowPrms_s
748 typedef struct EnetUdma_OpenTxChPrms_s
816 typedef struct EnetUdma_RxChInitPrms_s
830 typedef struct EnetUdma_Cfg_s
844 typedef struct EnetUdma_DmaCfg_s
uint32_t data1
Definition: enet_udma.h:474
struct EnetUdma_DmaDesc_s * pNextDesc
Definition: enet_udma.h:423
EnetDma_PktNotifyCb notifyCb
Definition: enet_udma.h:690
uint8_t dmaPriority
Definition: enet_udma.h:821
uint16_t fifoDepth
Definition: enet_udma.h:627
Udma_DrvHandle hUdmaDrv
Definition: enet_udma.h:847
uint32_t numRxPkts
Definition: enet_udma.h:697
#define ENET_UDMA_EXTENDED_PKT_INFO_BLOCK_SIZE
Extended Packet Info Block size.
Definition: enet_udma.h:81
EnetUdma_FreeDmaDescFxn dmaDescFreeFxn
Definition: enet_udma.h:794
struct EnetUdma_Cfg_s EnetDma_Cfg
Opaque handle that holds config Info for Enet DMA channel.
Definition: enet_udma.h:142
Param struct for the TX channel open function.
Definition: enet_udma.h:749
UDMA RX channel flow parameters.
Definition: enet_udma.h:524
void(* EnetUdma_FreeDmaDescFxn)(void *appPriv, struct EnetUdma_DmaDesc_s *dmaDescPtr)
Function pointer type for DMA descriptor free function.
Definition: enet_udma.h:175
bool disableCacheOps
Definition: enet_udma.h:262
uint32_t segmentFilledLen
Definition: enet_udma.h:257
EnetUdma_PktTsInfo tsInfo
Definition: enet_udma.h:324
uint8_t mode
Definition: enet_udma.h:489
EnetUdma_UdmaFlowPrms flowPrms
Definition: enet_udma.h:693
uint8_t srcTagLoSel
Definition: enet_udma.h:557
int32_t EnetUdma_checkTxChSanity(EnetDma_TxChHandle hTxCh, uint32_t margin)
Check if any packet loss in TX Channel FQ and CQ rings.
EnetUdma_DmaDescQHandle EnetUdma_getRxFlowDescPoolHandle(EnetDma_RxChHandle hRxFlow)
Get handle to DMA descriptor free pool for RX flow.
uint64_t rxPktTs
Definition: enet_udma.h:222
EnetUdma_SGListEntry EnetDma_SGListEntry
Definition: enet_udma.h:286
uint32_t pktState
Definition: enet_udma.h:302
bool disableCacheOpsFlag
Definition: enet_udma.h:777
uint8_t dmaPriority
Definition: enet_udma.h:617
bool useProxy
Definition: enet_udma.h:731
EnetUdma_FreeRingMemFxn ringMemFreeFxn
Definition: enet_udma.h:715
uint8_t txPktDomain
Definition: enet_udma.h:219
EnetUdma_UdmaChPrms udmaChPrms
Definition: enet_udma.h:759
uint32_t txPktTc
Definition: enet_udma.h:353
#define ENET_UDMA_DESC_ALIGNMENT
UDMA descriptor address alignment requirement.
Definition: enet_udma.h:137
This file contains the basic types using across the Enet driver.
void * appPriv
Definition: enet_udma.h:295
uint8_t busOrderId
Definition: enet_udma.h:612
uint8_t addrType
Definition: enet_udma.h:600
uint8_t *(* EnetUdma_AllocRingMemFxn)(void *appPriv, uint32_t numRingEle, uint32_t alignSize)
Function pointer type for packet allocation function.
Definition: enet_udma.h:161
Enet_MacPort
MAC port.
Definition: enet_types.h:409
bool disableCacheOpsFlag
Definition: enet_udma.h:700
uint8_t srcTagLo
Definition: enet_udma.h:547
EnetUdma_AutoReclaimPrms autoReclaimPrms
Definition: enet_udma.h:807
UDMA ring monitor config parameters.
Definition: enet_udma.h:450
EnetUdma_FreeDmaDescFxn dmaDescFreeFxn
Definition: enet_udma.h:721
EnetUdma_RingMonCfg ringMonCfg
Definition: enet_udma.h:498
EnetUdma_RxChInitPrms rxChInitPrms
Definition: enet_udma.h:836
bool useProxy
Definition: enet_udma.h:804
EnetDma_PktNotifyCb notifyCb
Definition: enet_udma.h:770
uint32_t flowIdx
Definition: enet_udma.h:679
void(* EnetUdma_FreeRingMemFxn)(void *appPriv, void *pRingMem, uint32_t numRingEle)
Function pointer type for packet free function.
Definition: enet_udma.h:166
struct EnetUdma_TxChObj_s * EnetDma_TxChHandle
Opaque handle that holds software state for Enet TX DMA channel.
Definition: enet_udma_types.h:99
EnetUdma_CpswHpdDesc hpdDesc
Definition: enet_udma.h:415
This file contains the type definitions and helper macros for the Enet software queue.
#define ENET_UDMA_PKT_DESC_RESERVED_SIZE
Extended Packet Info Block size.
Definition: enet_udma.h:87
uint32_t chIdx
Definition: enet_udma.h:673
uint32_t txTsId
Definition: enet_udma.h:356
uint8_t sizeThreshEn
Definition: enet_udma.h:581
void * cbArg
Definition: enet_udma.h:798
#define ENET_UDMA_CPSW_MAX_SG_LIST
Definition: enet_udma.h:113
uint8_t orderId
Definition: enet_udma.h:486
void(* EnetDma_PktNotifyCb)(void *cbArg)
Function pointer type for packet notify call back.
Definition: enet_udma.h:184
uint8_t txCredit
Definition: enet_udma.h:620
void * Udma_RingHandle
UDMA ring handle.
Definition: udma_types.h:71
bool enableFlag
Definition: enet_udma.h:647
uint16_t defaultRxCQ
Definition: enet_udma.h:537
A generic node structure for a single link list.
Definition: enet_queue.h:74
CSL_UdmapCppi5HMPD hostDesc __attribute__((aligned(ENET_UDMA_DESC_ALIGNMENT)))
uint8_t psInfoPresent
Definition: enet_udma.h:530
EnetUdma_DmaDescQHandle hDmaDescPool
Definition: enet_udma.h:652
#define ENET_UDMA_CPSW_MAX_HOSTBUFDESC_COUNT
Definition: enet_udma.h:122
bool enableHostTxTs
Definition: enet_udma.h:210
Param struct for the RX channel open.
Definition: enet_udma.h:817
EnetQ_Node node
Definition: enet_udma.h:292
Enet UDMA channel/flow auto-reclaim config struct.
Definition: enet_udma.h:634
EnetUdma_AllocDmaDescFxn dmaDescAllocFxn
Definition: enet_udma.h:791
Udma_RingHandle EnetUdma_getRxFlowFqHandle(EnetDma_RxChHandle hRxFlow)
Get RX flow FQ handle.
Udma_DrvHandle hUdmaDrv
Definition: enet_udma.h:751
struct EnetUdma_PktInfo_s EnetDma_Pkt
Opaque handle that represents a DMA packet.
Definition: enet_udma_types.h:104
int32_t EnetUdma_checkRxFlowSanity(EnetDma_RxChHandle hRxFlow, uint32_t margin)
Check if any packet loss in RX flow FQ and CQ rings.
EnetUdma_OpenRxFlowPrms EnetDma_OpenRxChPrms
Param struct for the RX channel open function. We include this typedef as top level DMA APIs use Enet...
Definition: enet_udma.h:741
EnetUdma_UdmaChTxPrms udmaTxChPrms
Definition: enet_udma.h:762
EnetUdma_UdmaRingPrms cqRingPrms
Definition: enet_udma.h:515
uint32_t data0
Definition: enet_udma.h:463
uint8_t * bufPtr
Definition: enet_udma.h:249
CSL_UdmapCppi5HMPD desc __attribute__((aligned(ENET_UDMA_DESC_ALIGNMENT)))
uint8_t destTagLo
Definition: enet_udma.h:567
uint32_t startIdx
Definition: enet_udma.h:676
uint32_t numScatterSegments
Definition: enet_udma.h:281
Enet_MacPort txPortNum
Definition: enet_udma.h:335
Definition: enet_udma.h:418
uint8_t filterEinfo
Definition: enet_udma.h:593
EnetDma_Handle EnetUdma_initDataPath(Enet_Type enetType, uint32_t instId, const EnetDma_initCfg *pDmaInitCfg)
Enet UDMA descriptor format.
Definition: enet_udma.h:376
uint8_t srcTagHiSel
Definition: enet_udma.h:552
bool useRingMon
Definition: enet_udma.h:495
This file contains the base DMA definitions.
void EnetUdma_initDataPathParams(EnetDma_initCfg *pDmaConfig)
bool useGlobalEvt
Definition: enet_udma.h:686
uint16_t reserved
Definition: tisci_boardcfg_rm.h:2
EnetUdma_AllocDmaDescFxn dmaDescAllocFxn
Definition: enet_udma.h:718
uint32_t rxFlowMtu
Definition: enet_udma.h:704
EnetDma_Pkt * dmaPkt
Definition: enet_udma.h:428
Enet_Type
Ethernet peripheral type.
Definition: enet_types.h:199
uint8_t destTagLoSel
Definition: enet_udma.h:577
bool useGlobalEvt
Definition: enet_udma.h:766
Config structure for Enet UDMA.
Definition: enet_udma.h:831
uint32_t segmentAllocLen
Definition: enet_udma.h:260
uint8_t txPktMsgType
Definition: enet_udma.h:216
uint8_t mode
Definition: enet_udma.h:452
UDMA Driver API/interface file.
EnetUdma_AllocRingMemFxn ringMemAllocFxn
Definition: enet_udma.h:712
Udma_RingHandle hReclaimRing
Definition: enet_udma.h:657
EnetUdma_DmaDescQHandle EnetUdma_getTxChDescPoolHandle(EnetDma_TxChHandle hTxCh)
Get handle to DMA descriptor free pool for TX channel.
uint8_t chanType
Definition: enet_udma.h:603
Param struct for the get default flowId open parameters.
Definition: enet_udma.h:668
void * Udma_DrvHandle
UDMA driver handle.
Definition: udma_types.h:65
struct EnetUdma_DmaDescQ_s * EnetUdma_DmaDescQHandle
Opaque handle to Enet UDMA descriptor queue.
Definition: enet_udma.h:149
Udma_DrvHandle hUdmaDrv
Definition: enet_udma.h:670
Udma_RingHandle EnetUdma_getTxChFqHandle(EnetDma_TxChHandle hTxCh)
Get TX channel FQ handle.
uint8_t destTagHiSel
Definition: enet_udma.h:572
uint16_t sopOffset
Definition: enet_udma.h:534
uint32_t numTxPkts
Definition: enet_udma.h:774
EnetUdma_SGList sgList
Definition: enet_udma.h:366
Packet data structure.
Definition: enet_udma.h:241
Transmit packet scatter list info.
Definition: enet_udma.h:277
uint8_t filterPsWords
Definition: enet_udma.h:596
CPPI buffer timestamp info.
Definition: enet_udma.h:208
EnetUdma_AllocRingMemFxn ringMemAllocFxn
Definition: enet_udma.h:785
CPPI DMA descriptor.
Definition: enet_udma.h:411
EnetUdma_AutoReclaimPrms autoReclaimPrms
Definition: enet_udma.h:734
Config structure for Enet UDMA Data Path initialization.
Definition: enet_udma.h:845
uint32_t txPktSeqId
Definition: enet_udma.h:213
uint8_t busPriority
Definition: enet_udma.h:606
uint32_t chkSumInfo
Definition: enet_udma.h:313
uint8_t destTagHi
Definition: enet_udma.h:562
uint32_t perDmaFlags
Definition: enet_udma.h:359
Enet_MacPort rxPortNum
Definition: enet_udma.h:340
struct EnetUdma_DmaDesc_s *(* EnetUdma_AllocDmaDescFxn)(void *appPriv, uint32_t alignSize)
Function pointer type for DMA descriptor allocation function.
Definition: enet_udma.h:171
Enet UDMA TX channel parameters.
Definition: enet_udma.h:591
uint8_t * origBufPtr
Definition: enet_udma.h:254
int32_t EnetUdma_deInitDataPath(EnetDma_Handle hEnetUdma)
Definition: enet_udma.h:288
struct EnetUdma_RxFlowObj_s * EnetDma_RxChHandle
Opaque handle that holds software state for Enet RX DMA flow.
Definition: enet_udma_types.h:94
struct EnetUdma_DrvObj_s * EnetDma_Handle
Opaque handle for Enet UDMA driver object.
Definition: enet_udma_types.h:85
Udma_DrvHandle hUdmaDrv
Definition: enet_udma.h:833
uint8_t srcTagHi
Definition: enet_udma.h:542
Enet UDMA RX flow/TX channel ring configuration parameters.
Definition: enet_udma.h:508
uint8_t einfoPresent
Definition: enet_udma.h:526
uint32_t chNum
Definition: enet_udma.h:756
void * cbArg
Definition: enet_udma.h:725
#define ENET_UDMA_PROTOCOL_SPECIFIC_INFO_BLOCK_SIZE
Extended Packet Info Block size.
Definition: enet_udma.h:84
EnetUdma_FreeRingMemFxn ringMemFreeFxn
Definition: enet_udma.h:788
Enet UDMA channel ring parameters.
Definition: enet_udma.h:483
EnetUdma_UdmaChPrms udmaChPrms
Definition: enet_udma.h:682
uint8_t busQos
Definition: enet_udma.h:609