Intel 324632-003 Switch User Manual


 
Intel
®
82575EB Gigabit Ethernet Controller — Receive Packet Checksum Offloading
Intel
®
82575EB Gigabit Ethernet Controller 324632-003
Software Developer’s Manual and EEPROM Guide Revision: 2.1
130 January 2011
5.5.1 Receive Packet Checksum Offloading
The 82575 supports the offloading of three receive checksum calculations: the Packet Checksum, the
IPv4 Header Checksum, and the TCP/UDP Checksum.
The Packet checksum is the one's complement over the receive packet, starting from the byte indicated
by RXCSUM.PCSS (0b corresponds to the first byte of the packet), after stripping. For packets with
VLAN header, the packet checksum includes the header if VLAN striping is not enabled by the
CTRL.VME. If VLAN header strip is enabled, the packet checksum and the starting offset of the packet
checksum exclude the VLAN header due to masking of VLAN header. For example, for an Ethernet II
frame encapsulated as an 802.3ac VLAN packet and CTRL.VME is set and with RXCSUM.PCSS set to 14,
the Packet Checksum includes the entire encapsulated frame, excluding the 14-byte Ethernet header
(DA, SA, Type/Length) and the 4-byte q-tag. The packet checksum does not include the Ethernet CRC if
the RCTL.SECRC bit is set.
Software must make the required offsetting computation (to back out the bytes that should not have
been included and to include the pseudo-header) prior to comparing the Packet Checksum against the
TCP checksum stored in the packet.
For supported packet/frame types, the entire checksum calculation can be off-loaded to the 82575. If
RXCSUM.IPOFL is set to 1b, the 82575 calculates the IPv4 checksum and indicates a pass/fail indication
to software via the IPv4 Checksum Error bit (RDESC.IPE) in the ERROR field of the receive descriptor.
Similarly, if RXCSUM.TUOFL is set to 1b, the 82575 calculates the TCP or UDP checksum and indicates a
pass/fail condition to software via the TCP/UDP Checksum Error bit (RDESC.TCPE). These error bits are
valid when the respective status bits indicate the checksum was calculated for the packet (RDESC.IPCS
and RDESC.TCPCS respectively). Similarly, if RFCTL.IPv6_DIS and RFCTL.IP6Xsum_DIS are cleared to
0b and RXCSUM.TUOFL is set to 1b, the 82575 calculates the TCP or UDP checksum for IPv6 packets. It
then indicates a pass/fail condition in the TCP/UDP Checksum Error bit (RDESC.TCPE).
If neither RXCSUM.IPOFLD nor RXCSUM.TUOFLD is set, the Checksum Error bits (IPE and TCPE) is 0b
for all packets.
Supported Frame Types include:
Ethernet II
Ethernet SNAP
Table 34. Supported Receive Checksum Capabilities
Packet Type HW IP Checksum Calculation HW TCP/UDP Checksum Calculation
IPv4 packets Yes
1
Yes
IPv6 packets No (n/a) Yes
IPv6 packet with next header options:
Hop-by-Hop options
Destinations options
Routing (with LEN 0)
Routing (with LEN > 0
Fragment
Home option
No (n/a)
No (n/a)
No (n/a)
No (n/a)
No (n/a)
No (n/a)
Yes
Yes
Yes
No
No
No
IPv4 tunnels:
IPv4 packet in an IPv4 tunnel
IPv6 packet in an IPv4 tunnel
Either IP or TCP
a
Either IP or TCP
a
Either IP or TCP
a
Either IP or TCP
a