SPRUII0F May 2019 – June 2024 TMS320F28384D , TMS320F28384D-Q1 , TMS320F28384S , TMS320F28384S-Q1 , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388S
Ethernet module provides the Checksum Offload Engine that is used to detect any error in an IPv4 or IPv6 packet in the receive path. The MAC verifies the checksum field of the received packet with the internally calculated checksum and provides the status.
The Receive Checksum Offload engine is used to detect errors in IP packets by calculating the header checksum and further matching it with the received header checksum. This engine also identifies a TCP, UDP, or ICMP payload in received IP packets and calculates the checksum of such payloads appropriately.
Here, both IPv4 and IPv6 packet in the received Ethernet packets are detected and processed for data integrity. The MAC receiver identifies IPv4 or IPv6 packets by checking for value 0x0800 or 0x86DD, respectively, in the Type field of the received Ethernet packet. This identification is applicable to single VLAN-tagged packets. It is also applicable to double VLAN-tagged packets when the Enable Double VLAN Processing option is selected and the EDVLP bit of the MAC_VLAN_Tag register is set.
The Rx COE calculates the IPv4 header checksums and checks that the checksums match the received IPv4 header checksums. The result of this operation (pass or fail) is given to the RFC module for insertion into the receive status word. The IP Header Error bit is set for any mismatch between the indicated payload type (Ethernet Type field) and the IP header version, or when the received packet does not have enough bytes, as indicated by the Length field of the IPv4 header (or when fewer than 20 bytes are available in an IPv4 or IPv6 header).
This engine also identifies a TCP, UDP, or ICMP payload in the received IP datagrams (IPv4 or IPv6) and calculates the checksum of such payloads properly, as defined in the TCP, UDP, or ICMP specifications. This engine includes the TCP, UDP, or ICMPv6 pseudo-header bytes for checksum calculation and checks whether the received checksum field matches the calculated value. The result of this operation is given as a Payload Checksum Error bit in the receive status word. This status bit is also set if the length of the TCP, UDP, or ICMP payload does not match the expected payload length given in the IP header.
Table 43-26 describes the functions supported by the Rx COE based on the packet type. When the payload of an IP packet is not processed (indicated as "No" in Table 43-26), the information (whether the checksum engine is bypassed or not) is given in the receive status.
Packet Type | Hardware IP Header Checksum Checking | Hardware TCP/UDP/ICMP Checksum Checking |
---|---|---|
Non-IPv4 or IPv6 | No | No |
IPv4 packet is greater than 1,522 bytes (2,000 bytes when IEEE 802.3ad Support for 2K Packets is enabled in the MAC) | Yes | Yes |
IPv6 packet is greater than 1,522 bytes (2,000 bytes when IEEE 802.3ad Support for 2K Packets is enabled in the MAC) | Not Applicable | Yes |
IPv4 with TCP, UDP, or ICMP | Yes | Yes |
IPv4 header's protocol field contains a protocol other than TCP, UDP, or ICMP | Yes | No |
IPv4 packet has IP options (IP header is longer than 20 bytes) | Yes | Yes |
Packet is an IPv4 fragment | Yes | No |
IPv6 packet with the following next header fields in main or extension headers: | Not Applicable | Yes |
Hop-by-hop options (in IPv6 main header) | Not Applicable | No |
Hop-by-hop options (in IPv6 extension header) | Not Applicable | Yes |
Destinations options | Not Applicable | Yes |
Routing (with segment left 0) | Not Applicable | No |
Routing (with segment left > 0)TCP, UDP, or ICMP | Not Applicable | Yes |
Any other next header field in main or extension headers | Not Applicable | No |
IPv4 packet has TCP header with Options fields | Yes | Yes |
IPv4 Tunnels: | ||
IPv4 packet in an IPv4 tunnel | Yes (IPv4 tunnel header) | No |
IPv6 packet in an IPv4 tunnel | Yes (IPv4 tunnel header) | No |
IPv4 Tunnels: | ||
IPv4 packet in an IPv6 tunnel | Not Applicable | No |
IPv6 packet in an IPv6 tunnel | Not Applicable | No |
IPv4 packet has 802.3ac tag (with C-VLAN Tag or S-VLAN Tag when enabled) | Yes | Yes |
IPv6 packet has 802.3ac tag (with C-VLAN Tag or S-VLAN Tag when enabled) | Not Applicable | Yes |
IPv4 frames with security features (such as encapsulated security payload) | Yes | No |
IPv6 frames with security features (such as encapsulated security payload) | Not Applicable | No |