Intel 324632-003 Switch User Manual


 
TCP Segmentation — Intel
®
82575EB Gigabit Ethernet Controller
324632-003 Intel
®
82575EB Gigabit Ethernet Controller
Revision: 2.1 Software Developer’s Manual and EEPROM Guide
January 2011 147
write-back descriptors. Secondly, to preserve backward compatibility, if the TXDCTL[n].WTHRESH value
is 0b, the 82575 writes back a single byte of the descriptor (TDESCR.STA) and all other bytes of the
descriptor are left unchanged.
Since the benefit of delaying and then bursting transmit descriptor write-backs is small at best, it is
likely that the threshold are left at the default value (0b) to force immediate write-back of transmit
descriptors and to preserve backward compatibility.
Descriptors are written back in one of three conditions:
TXDCTL[n].WTHRESH = 0b and a descriptor which has RS set is ready to be written back
The corresponding EITR counter has reached zero
TXDCTL[n].WTHRESH > 0b and TXDCTL[n].WTHRESH descriptors have accumulated
For the first condition, write-backs are immediate. This is the default operation and is backward
compatible.
The other two conditions are only valid if descriptor bursting is enabled. In the second condition, the
EITR counter is used to force timely write–back of descriptors. The first packet after timer initialization
starts the timer. Timer expiration flushes any accumulated descriptors and sets an interrupt event
(TXDW).
For the final condition, if TXDCTL[n].WTHRESH descriptors are ready for write-back, the write-back is
performed.
5.8 TCP Segmentation
Hardware TCP Segmentation is one of the off-loading options of most modern TCP/IP stacks. This is
often referred to as Transmit Segmentation Offloading (TSO). This feature enables the TCP/IP stack to
pass to the 82575’s software device driver a message to be transmitted that is bigger than the
Maximum Transmission Unit (MTU) of medium. It is then the responsibility of the software device driver
and hardware to carve the TCP message into MTU size frames that have appropriate layer 2 (Ethernet),
3 (IP), and 4 (TCP) headers. These headers must include sequence number, checksum fields, options
and flag values as required. Note that some of these values (such as the checksum values) are unique
for each packet of the TCP message, and other fields such as the source IP address are constant for all
packets associated with the TCP message.
Padding (TCTL.PSP) must be enabled in TCP segmentation mode, since the last frame might be shorter
than 60 bytes - resulting in a bad frame if PSP is disabled.
The offloading of these mechanisms to the software device driver and the 82575 saves significant CPU
cycles. The software device driver shares the additional tasks to support these options with the 82575.
Note: Although the 82575’s TCP segmentation offload implementation was specifically designed to
take advantage of new “TCP Segmentation offload” features, the hardware implementation
was made generic enough so that it could also be used to “segment” traffic from other
protocols. For instance, this feature could be used any time it is desirable for hardware to
segment a large block of data for transmission into multiple packets that contain the same
generic header.