Receive and Transmit Description
64 Software Developer’s Manual
UDP pseudo header has the same format as the TCP pseudo header. The IPv4 pseudo header
conceptually prefixed to the UDP header contains the IPv4 source address, the IPv4 destination
address, the IPv4 protocol field, and the UDP length (same as the TCP Length discussed above).
The IPv6 pseudo header for UDP is the same as the IPv6 pseudo header for TCP. This checksum
procedure is the same as is used in TCP.
Figure 3-17. UDP Pseudo Header Diagram for IPv4
Figure 3-18. UDP PseudoHeader Diagram for IPv6
Note: The IP Destination Address is the final destination of the packet. Therefore, if a routing header is
used, the last address in the route list is used in this calculation. The upper-layer packet length is
the length of the UDP header and UDP payload.
Unlike the TCP checksum, the UDP checksum is optional. Software must set the TXSM bit in the
TCP/IP Context Transmit Descriptor to indicate that a UDP checksum should be inserted.
Hardware does not overwrite the UDP checksum unless the TXSM bit is set.
3.5.8 Transmit Checksum Offloading with TCP Segmentation
The Ethernet controller supports checksum off-loading as a component of the TCP Segmentation
offload feature and as a standalone capability. Section 3.5.8 describes the interface for controlling
the checksum off-loading feature. This section describes the feature as it relates to TCP
Segmentation.
The Ethernet controller supports IP and TCP/UDP header options in the checksum computation for
packets that are derived from the TCP Segmentation feature. The Ethernet controller is capable of
computing one level of IP header checksum and one TCP/UDP header and payload checksum. In
case of multiple IP headers, the driver has to compute all but one IP header checksum. The
Ethernet controller calculates checksums on the fly on a frame by frame basis and inserts the result
in the IP/TCP/UDP headers of each frame. TCP and UDP checksum are a result of performing the
checksum on all bytes of the payload and the pseudo header.
IP Source Address
IP Destination Address
Zero
Layer 4
Protocol ID
UDP Length
IP Source Address
IP Destination Address
Upper Layer Packet Length
Zero Next Header