The TCP Segmentation Offload (TSO)
engine is used to offload the TCP segmentation functions to the hardware. To program
the TSO, set the TSE bit to enable TCP packet segmentation, and program descriptor
fields to enable TSO for the current packet.
Complete the following steps to
program TSO:
- Program the TSE bit of corresponding DMA_CH[n]_Tx_Control
register to enable TCP packet segmentation in that DMA.
- In addition to the normal transfer descriptor setting, the
following descriptor fields must be programmed to enable TSO for the current
packet:
- Enable TSE in Bit 18 of TDES3.
- Program the length of the unsegmented TCP/IP packet
payload in bits [17:0] of TDES3 and the TCP header in bits [22:19] of
TDES3.
- Program the maximum size of the segment in MSS of
DMA_CH[n]_Control register or MSS in the context descriptor. If MSS
field is programmed in both DMA_CH[n]_Control register and in the
context descriptor, the latest software programmed sequence is
considered.
- The header of the unsegmented TCP/IP packet can be in Buffer 1
of the first descriptor and this buffer must not hold any payload bytes. The
payload is allocated to Buffer 2 and the buffers of the subsequent
descriptors.
Note: If TSE is enabled in TDES3 for a
non-TCP-IP packet, the result is unpredictable.