SPRUIM2H May 2020 – October 2023 AM2431 , AM2432 , AM2434 , AM6411 , AM6412 , AM6421 , AM6422 , AM6441 , AM6442
When packet reception begins on a given channel, the port will begin by fetching the descriptor and buffer from the ring for the channel / flow. If the SOP Buffer Offset in the Rx Flow Table entry is nonzero, then the port will begin writing data after the offset number of bytes in the SOP buffer. The port will then continue filling that buffer and will fill additional descriptors + buffers as needed using the pre-linked buffers in the packet.
A detailed summary is as follows:
Host allocates, populates, and places pointers to free descriptor/buffer structures onto Rx Free Descriptor/Buffer Queues
PKTDMA fetches packet descriptor pointer from forward queue of ring for specified channel.
PKTDMA reads the packet descriptor to obtain the packet info, buffer pointer, buffer size, and next descriptor pointer.
PKTDMA fills the buffer with received data
If packet is not complete and the rx_chan_type field in the Rx Channel Configuration Register (<RCHAN[a]_RCFG> [19:16] RX_CHAN_TYPE) is set to 2 (Normal Rx Host Mode). The machine will proceed to step 5 and will repeat steps 5-6 until all packet data is received at which point the Rx engine proceeds to step 8. If the rx_desc_type is set to 3 (Single Buffer Packet Host Mode) the Rx engine will proceed directly to step 7 regardless of whether or not an end of packet terminator has been reached on the incoming data stream. The current packet will be completed following the sequence through step 12 and a new packet will be started back at step 1.
5. PKTDMA fetches next buffer descriptor using next descriptor pointer obtained from previous descriptor.
6. PKTDMA fills the buffer with received data.
The PKTDMA performs the following operations when the entire packet has been received:
7. PKTDMA writes the packet descriptor to memory. This includes the following fields:
a. Descriptor Type (set to Host)
b. Packet Length indicating the total number of bytes that are to be read from all of the buffers for this packet.
c. Source Tag
d. Destination Tag
e. Packet Type
f. Any protocol specific flags for the given packet type
g. Any protocol specific words that are required for the given packet type
h. Extended Packet Information (optional)
8. PKTDMA increments the occupancy of the reverse queue for the channel / flow.
9. Once the occupancy is incremented it will send an up event to the Interrupt Aggregator
10. The Interrupt Aggregator upon receiving the up event will set the appropriate bit in the Interrupt Status Register (VINT[a]_STATUS_SET) indicated by the interrupt mapping table which will cause an interrupt to be asserted to the Host
11.The Host will pop the packet pointer from the Rx Queue by reading the ring contents and then pushing a decrement to the reverse occupancy for the ring.
12. If the pop causes the queue to become empty, the PKTDMA will send a down event to the Interrupt Aggregator thus causing the associated bit to be cleared and also potentially clearing the interrupt to the Host.