2.6 Packet Transmission Overview
After a TX DMA channel has been initialized, it can begin to be used to transmit packets. Packet transmission involves the following steps:
- The host is made aware of one or more chunks of data in memory that need to be transmitted as a packet. This may involve directly sourcing data from the host or it may involve data that has been forwarded from another data source in the system.
- The host allocates a descriptor, usually from a TX completion queue, and fills in the descriptor fields and payload data.
- For host packet descriptors, the host allocates and populates host buffer descriptors as necessary to point to any remaining chunks of data that belong to this packet.
- The host writes the pointer to the packet descriptor into a specific memory mapped location inside the queue manager that corresponds to one of the transmit queues for the desired DMA channel. Channels may provide more than one TX queue and may provide a particular prioritization policy between the queues. This behavior is application-specific and is controlled by the DMA controller / scheduler implementation.
- The queue manager provides a level sensitive status signal for the queue that indicates if any packets are currently pending. This level-sensitive status line is sent to the hardware block that is responsible for scheduling DMA operations.
- The DMA controller is eventually brought into context for the corresponding channel and begins to process the packet.
- The DMA controller reads the packet descriptor pointer and descriptor size hint information from the queue manager. This is the push value written to the Queue N Reg D registers.
- The DMA controller reads the packet descriptor from memory.
- The DMA controller empties the buffer (or for linked host packets, each buffer in sequence specified by the next descriptor pointer) by transmitting the contents in one or more block data moves. The size of these blocks is application-specific.
- When all data for the packet has been transmitted as specified in the packet size field, the DMA will write the pointer to the packet descriptor to the queue specified in the return queue manager / return queue number fields of the packet descriptor.
- After the packet descriptor pointer has been written, the queue manager will indicate the status of the TX completion queues to other ports / processors / prefetcher blocks using out-of-band level sensitive status lines. These status lines are set anytime a queue is non-empty.
- While most types of peer entities and embedded processors are able to directly and efficiently use these level sensitive status lines, cached processors may require a hardware block to convert the level status into pulsed interrupts and to perform some level of aggregation of the descriptor pointers from the completion queues into lists.
- Host responds to status change from queue manager and performs garbage collection as necessary for packet.
This complete process is shown in Figure 2-2.