BCM5722
Programmer's Guide
10/15/07
C
O
HECKSUM
FFLOAD
As network speed increases, offloading is becoming an important feature, and the ability to offload tasks from the host
processor aids in the efficiency of the host and in overall system performance. To achieve a significant performance boost,
most operating systems now a days offer a mechanism for the TCP/IP protocol stack to offload checksum calculations to
the device.
The host software can configure the BCM5722 Ethernet controller to calculate IP, TCP, and UDP checksum as described in
RFC 791, RFC 793, and RFC 768 respectively. The first step in checksum calculation is determining the start of an IP and
UDP datagram and TCP segment within a frame, which could vary depending on whether the frame is tagged (VLAN) or
encapsulated with LLC/SNAP header. Then the checksum is computed from the start to the end of the datagram and
inserted into the appropriate location in protocol header. BCM5722 Ethernet controller is designed to support checksum
calculation on all frame types and also on IP datagram and TCP segments containing options.
For the BCM5722 Ethernet controller to compute the checksum and insert it into the outgoing frame, the host software must
set the appropriate control bits in the send buffer descriptors associated with the frame and seed the checksum field with
zero or with the pseudo header checksum.
The host software enables IP checksum calculation by setting the IP_CHKSUM bits in all the send buffer descriptors
associated with the frame. The BCM5722 Ethernet controller inserts the checksum into the checksum field of the IP header.
To enable TCP or UDP checksum calculation, the host software must set the TCP_UDP_CKSUM bit in all the send buffer
descriptors associated with the frame containing the entire UDP datagram or TCP segment. The TCP and UDP checksum
engines do not span IP fragmented frames.
The host software can configure the BCM5722 Ethernet controller to disable TCP or UDP pseudo-header checksum
calculation by setting the Mode_Control.Send_No_Pseudo_Header_Checksum bit. When set, the host software must seed
the checksum field in the TCP or UDP header with the pseudo- header checksum. If the
Mode_Control.Send_No_Pseudo_Header_Checksum is cleared, the BCM5722 Ethernet controller computes the checksum
including the pseudo header and inserts it into the checksum field.
Bro adco m C orp or atio n
Page 77
Checksum Offload
Document 5722-PG101-R
Need help?
Do you have a question about the BCM5722 and is the answer not in the manual?