AM263x MCU+ SDK  09.02.00

Detailed Description

Packet data structure.

This structure contains packet info used by application for getting/passing the packet data with DMA module. The packet data structure supportes scatter list for transmit but not for receive.

  • Trasmit no scatter list case (single contiguous buffer trasmitted) If single buffer is used for transmission Packet Payload is bufPtr Packet length is tx.totalPktLen tx.bufPtrFilledLen is equal to totalPktLen sgList.numScatterSegments == 0
  • Transmit scatter list case Packet is made of discontinuous chunks of data linked together If list of discontinuous fragments make up a single packet First segment is pointed to by bufPtr Packet length is tx.totalPktLen tx.bufPtrFilledLen is equal to valid data in bufPtr sgList.numScatterSegments == (number of fragments making up the packet - 1) The first segment of scatter list is pointed to by bufPtr. Length of the first segment is tx.bufPtrFilledLen The array sgList.list points to packets from 2 to the last fragments Each fragment from 2 to the last fragment has bufPtr : Pointer to start of fragment filledLen: Length of fragment

Data Fields

EnetQ_Node node
 
void * appPriv
 
uint32_t pktState
 
uint32_t chkSumInfo
 
EnetCpdma_PktTsInfo tsInfo
 
Enet_MacPort txPortNum
 
Enet_MacPort rxPortNum
 
uint32_t txPktTc
 
uint32_t txTsId
 
EnetCpdma_SGList sgList
 

Field Documentation

◆ node

EnetQ_Node EnetCpdma_PktInfo::node

Pointer to next buffer. Note: Keep EnetQ_Node as first member always as driver uses generic queue functions and dereferences to this member

◆ appPriv

void* EnetCpdma_PktInfo::appPriv

Pointer to application layer specific data blob

◆ pktState

uint32_t EnetCpdma_PktInfo::pktState

Packet state info. Refer to EnetDma_PktStateModuleType, EnetDma_PktStateMemMgr, EnetDma_PktStateDma and EnetDma_PktStateApp.

This is only for runtime check and debug, not to be used by application

◆ chkSumInfo

uint32_t EnetCpdma_PktInfo::chkSumInfo

Protocol information word. Currently used for checksum offload related information.

For RX it contains HW computed checksum. App should call appropriate CPPI helper macros to extract required fields.

For TX it contains information passed to HW for checksum computation. App should call appropriate CPPI helper macros to insert required fields

◆ tsInfo

EnetCpdma_PktTsInfo EnetCpdma_PktInfo::tsInfo

Packet time stamp information.

For TX, if tsInfo.enableHostTxTs flag is set to true, packet will be timestampped on egress and will trigger host transmit event in CPTS. The timestamp value is then stored in CPTS FIFO with given sequence Id, message type and domain value. This can be used to timestamp any packet (even non-PTP) sent from host.

For RX, the received packet's ingress timestamp is captured and is stored in tsInfo.rxPktTs. All ingress packets are timestampped.

◆ txPortNum

Enet_MacPort EnetCpdma_PktInfo::txPortNum

Directed port number.

The port number to which the packet is to be directed bypassing ALE lookup. This value is written to Dst Tag – Low bits of packet descriptor. If ALE lookup based switching is to be performed, this value should be set to ENET_MAC_PORT_INV.

Note: Directed packets go to the directed port, but an ALE lookup is performed to determine untagged egress in VLAN aware mode.

◆ rxPortNum

Enet_MacPort EnetCpdma_PktInfo::rxPortNum

Packet's received port number This variable contains the port number from which the packet was received. This value is obtained from the Source Tag – Low bits of packet descriptor.

◆ txPktTc

uint32_t EnetCpdma_PktInfo::txPktTc

TX packet traffic class indicates which TX port queue. This is not used for CPDMA. Keeping this to maintain same pktInfo structure across CPDMA and UDMA.

◆ txTsId

uint32_t EnetCpdma_PktInfo::txTsId

Transmit timestamp id. Used to correlate request with response. This is not used for CPDMA. Keeping this to maintain same pktInfo structure across CPDMA and UDMA.

◆ sgList

EnetCpdma_SGList EnetCpdma_PktInfo::sgList

Scatter Gather list information for packets to be transmitted. A single tx packet can be fragmented across multiple chunks, the bufPtrs and filled len of each segment are contained here. sgList.numScatterSegments = 1 by default.