PDK API Guide for J721E

Detailed Description

Packet data structure.

This structure contains packet info used by application for getting/passing the packet data with DMA module.

Data Fields

EnetQ_Node node
 
uint8_t * bufPtr
 
uint32_t orgBufLen
 
uint32_t userBufLen
 
void * appPriv
 
uint32_t pktState
 
uint32_t chkSumInfo
 
EnetUdma_PktTsInfo tsInfo
 
Enet_MacPort txPortNum
 
Enet_MacPort rxPortNum
 
uint32_t txPktTc
 
uint32_t txTsId
 

Field Documentation

◆ node

EnetQ_Node EnetUdma_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

◆ bufPtr

uint8_t* EnetUdma_PktInfo::bufPtr

Pointer to data buffer

◆ orgBufLen

uint32_t EnetUdma_PktInfo::orgBufLen

Original length of the data buffer passed

◆ userBufLen

uint32_t EnetUdma_PktInfo::userBufLen

Actual filled buffer length while receiving/transmitting data with DMA

◆ appPriv

void* EnetUdma_PktInfo::appPriv

Pointer to application layer specific data blob

◆ pktState

uint32_t EnetUdma_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 EnetUdma_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

EnetUdma_PktTsInfo EnetUdma_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 EnetUdma_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 EnetUdma_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 EnetUdma_PktInfo::txPktTc

TX packet traffic class indicates which TX port queue the ICSSG FW should use the transmit the packet to the PHY

◆ txTsId

uint32_t EnetUdma_PktInfo::txTsId

Transmit timestamp id. Used to correleate request with response