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.
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 |
uint32_t | perDmaFlags |
EnetCpdma_SGList | sgList |
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
void* EnetCpdma_PktInfo::appPriv |
Pointer to application layer specific data blob
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
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
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.
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.
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.
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.
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.
uint32_t EnetCpdma_PktInfo::perDmaFlags |
Additional DMA metadata flags used to communicate with ICSSG. Not used for CPDMA, keeping this to maintain same pktInfo structure across CPDMA and UDMA.
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.