62.6.7.1 Receiver Checksum Offload

When receive checksum offloading is enabled in the GMAC, the IPv4 header checksum is checked as per RFC 791, where the packet meets the following criteria:

  • If present, the VLAN header must be four octets long and the CFI bit must not be set.
  • Encapsulation must be RFC 894 Ethernet Type Encoding or RFC 1042 SNAP Encoding.
  • IPv4 packet
  • IP header is of a valid length

The GMAC also checks the TCP checksum as per RFC 793, or the UDP checksum as per RFC 768, if the following criteria are met:

  • IPv4 or IPv6 packet
  • Good IP header checksum (if IPv4)
  • No IP fragmentation
  • TCP or UDP packet

When an IP, TCP or UDP frame is received, the receive buffer descriptor gives an indication if the GMAC was able to verify the checksums. There is also an indication if the frame had SNAP encapsulation. These indication bits will replace the type ID match indication bits when the receive checksum offload is enabled. For details of these indication bits, see Receive Buffer Descriptor Entry.

If any of the checksums are verified as incorrect by the GMAC, the packet is discarded and the appropriate statistics counter incremented.