220.127.116.11. Length Checking
The frame length must be at least 64 (0x40) bytes and not exceed the following maximum value for the different frame types:
- Basic frames—the value specified in the frm_length register
- VLAN tagged frames—the value specified in the frm_length register plus four
- Stacked VLAN tagged frames—the value specified in the frm_length register plus eight
To prevent FIFO buffer overflow, the MAC function truncates the frame if it is more than 11 bytes longer than the allowed maximum length.
For frames of a valid length, the MAC function continues to check the payload length if the NO_LGTH_CHECK bit in the command_config register is set to 0. The MAC function keeps track of the payload length as it receives a frame, and checks the length against the length/type field in basic MAC frames or the client length/type field in VLAN tagged frames. The payload length is valid if it satisfies the following conditions:
- The actual payload length matches the value in the length/type or client length/type field.
- Basic frames—the payload length is between 46 (0x2E)and 1536 (0x0600) bytes, excluding 1536.
- VLAN tagged frames—the payload length is between 42 (0x2A)and 1536 (0x0600), excluding 1536.
- Stacked VLAN tagged frames—the payload length is between 38 (0x26) and 1536 (0x0600), excluding 1536.
If the frame or payload length is not valid, the MAC function asserts one of the following signals to indicate length error:
- rx_err in MACs with internal FIFO buffers.
- data_rx_error in MACs without internal FIFO buffers.
Did you find the information on this page useful?