GD32F20x User Manual
794
TCP/UDP/ICMP payload checksum
The checksum offload module processes the IPv4 or IPv6 header (including extension
headers) and marks the type of frame (TCP, UDP or ICMP).
But when the following frame cases are detected, the checksum offload function will be
bypassed and these frames will not be processed by the checksum offload module:
1) Incomplete IPv4 or IPv6 frames
2) IP frames with security features (e.g. authentication header, security payload)
3) IP frames without TCP/UDP/ICMPv4/ICMPv6 payload
4) IPv6 frames with routing headers
The checksum offload module calculates the TCP, UDP, or ICMP payload and inserts the
result into its corresponding field in the header. It has two modes when working, as follows:
1) TCP, UDP, or ICMPv6 pseudo-header is not included in the checksum calculation and is
assumed to be present in the input frame’s checksum field. The checksum field is included in
the checksum calculation, and then replaced by the final calculated checksum.
2) Checksum offload module clears the contents of the checksum field in the transmission
frame and make calculation which includes TCP, UDP, or ICMPv6 pseudo-header data and
will instead the transmission frame’s original checksum field by the final calculation results.
After calculated by checksum offload module, the result can be found in IPPE bit (bit 12 in
TDES0). The following shows the conditions under which the IPPE bit can be set:
1) In Store-and-Forward mode, frame has been forwarded to MAC transmitter but no EOF is
written to TxFIFO
2) Frame is ended but the byte numbers which the payload length field of the frame indicates
has not been reached
If the packet length is greater than the marked length, checksum module does not report
errors, the excess data will be discarded as padding bytes. If the first condition of IPPE error
is detected, the value of the checksum does not insert a TCP, UDP or ICMP header. If the
second condition of IPPE error is detected, checksum calculation results will still insert the
appropriate header fields.
Note:
For ICMP packets over IPv4 frame, the checksum field in the ICMP packet must always
be 0x0000 in both modes due to such packets are not defined pseudo-headers.
MAC receive filters
The MAC filter is divided into error filtering (such as too short frame, CRC error and other bad
frame filtering) and address filtering. This section mainly describes the address filtering.
Address filtering
Address filtering use the static physical address (MAC address) filter and hash list filter for
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...