Intel 82546GB/EB Network Card User Manual


 
Receive and Transmit Description
Software Developer’s Manual 41
3.3.5 TCP/IP Context Transmit Descriptor Format
The TCP/IP context transmit descriptor provides access to the enhanced checksum offload facility
available in the Ethernet controller. This feature allows TCP and UDP packet types to be handled
more efficiently by performing additional work in hardware, thus reducing the software overhead
associated with preparing these packets for transmission.
The TCP/IP context transmit descriptor does not point to packet data as a data descriptor does.
Instead, this descriptor provides access to an on-chip context that supports the transmit checksum
offloading feature of the controller. A “context” refers to a set of registers loaded or unloaded as a
group to provide a particular function.
The context is explicit and directly accessible via the TCP/IP context transmit descriptor. The
context is used to control the checksum offloading feature for normal packet transmission.
The Ethernet controller automatically selects the appropriate legacy or normal context to use based
on the current packet transmission.
While the architecture supports arbitrary ordering rules for the various descriptors, there are
restrictions including:
Context descriptors should not occur in the middle of a packet.
Data descriptors of different packet types (legacy or normal) should not be intermingled
except at the packet level.
All contexts control calculation and insertion of up to two checksums. This portion of the context is
referred to as the checksum context.
In addition to checksum context, the segmentation context adds information specific to the
segmentation capability. This additional information includes the total payload for the message
(TDESC.PAYLEN), the total size of the header (TDESC.HDRLEN), the amount of payload data
that should be included in each packet (TDESC.MSS), and information about what type of protocol
(TCP, IPv4, IPv6, etc.) is used. This information is specific to the segmentation capability and is
therefore ignored for context descriptors that do not have the TSE bit set.
Because there are dedicated resources on-chip for the normal context, the context remains constant
until it is modified by another context descriptor. This means that a context can be used for multiple
packets (or multiple segmentation blocks) unless a new context is loaded prior to each new packet.
Depending on the environment, it may be completely unnecessary to load a new context for each
packet. For example, if most traffic generated from a given node is standard TCP frames, this
context could be set up once and used for many frames. Only when some other frame type is
required would a new context need to be loaded by software. After the “non-standard” frame is
transmitted, the “standard” context would be setup once more by software. This method avoids the
“extra descriptor per packet” penalty for most frames. The penalty can be eliminated altogether if
software elects to use TCP/IP checksum offloading only for a single frame type, and thus performs
those operations in software for other frame types.
This same logic can also be applied to the segmentation context, though the environment is a more
restrictive one. In this scenario, the host is commonly asked to send a message of the same type,
TCP/IP for instance, and these messages also have the same total length and same maximum
segment size (MSS). In this instance, the same segmentation context could be used for multiple
TCP messages that require hardware segmentation. The limitations of this scenario and the
relatively small performance advantage make this approach unlikely; however, it is useful in
understanding the underlying mechanism.