Intel 82540EP/EM Network Card User Manual


 
Software Developer’s Manual 17
Architectural Overview
2.7 Hardware Acceleration Capability
The Ethernet controller provides the ability to offload IP, TCP, and UDP checksum for transmit.
The functionality provided by these features can significantly reduce processor utilization by
shifting the burden of the functions from the driver to the hardware.
The checksum offloading feature is briefly outlined in the following sections. More detail about all
of the hardware acceleration capabilities is provided in Section 3.2.9.
2.7.1 Checksum Offloading
The Ethernet controller provides the ability to offload the IP, TCP, and UDP checksum require-
ments from the software device driver. For common frame types, the hardware automatically
calculates, inserts, and checks the appropriate checksum values normally handled by software.
For transmits, every Ethernet packet might have two checksums calculated and inserted by the
Ethernet controller. Typically, these would be the IP checksum, and either the TCP or UDP
checksum. The software device driver specifies which portions of the packet are included in the
checksum calculations, and where the calculated values are inserted via descriptors (refer to
Section 3.3.5 for details).
For receives, the hardware recognizes the packet type and performs the checksum calculations and
error checking automatically. Checksum and error information is provided to software through the
receive descriptors (refer to Section 3.2.9 for details).
2.7.2 TCP Segmentation
The Ethernet controller implements a TCP segmentation capability for transmits that allows the
software device driver to offload packet segmentation and encapsulation to the hardware. The
software device driver can send the Ethernet controller the entire IP, TCP or UDP message sent
down by the Network Operating System (NOS) for transmission. The Ethernet controller segments
the packet into legal Ethernet frames and transmit them on the wire. By handling the segmentation
tasks, the hardware alleviates the software from handling some of the framing responsibilities. This
reduces the overhead on the CPU for the transmission process thus reducing overall CPU
utilization. See Section 3.5 for details.
2.8 Buffer and Descriptor Structure
Software allocates the transmit and receive buffers, and also forms the descriptors that contain
pointers to, and the status of, those buffers. A conceptual ownership boundary exists between the
driver software and the hardware of the buffers and descriptors. The software gives the hardware
ownership of a queue of buffers for receives. These receive buffers store data that the software then
owns once a valid packet arrives.
For transmits, the software maintains a queue of buffers. The driver software owns a buffer until it
is ready to transmit. The software then commits the buffer to the hardware; the hardware then owns
the buffer until the data is loaded or transmitted in the transmit FIFO.