25G Ethernet Intel® Arria® 10 FPGA IP User Guide

ID 683639
Date 3/29/2021
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

4.1.3.3.1. Length Checking

The MAC function checks the frame and payload lengths of basic, VLAN tagged, and stacked VLAN tagged frames.

The IP core checks that the frame length is valid—is neither undersized nor oversized. A valid frame length is at least 64 (0x40) bytes and does not exceed the following maximum value for the different frame types:

  • Basic frames—The number of bytes specified in the MAX_RX_SIZE_CONFIG register.
  • VLAN tagged frames—The value specified in the MAX_RX_SIZE_CONFIG register plus four bytes.
  • Stacked VLAN tagged frames—The value specified in the MAX_RX_SIZE_CONFIG register plus eight bytes.

If the length/type field in a basic MAC frame or the client length/type field in a VLAN tagged frame has a value less than 0x600, the IP core also checks the payload length. The IP core keeps track of the payload length as it receives a frame, and checks the length against the relevant frame field. 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.
  • Normal frames:
    • 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.
  • Jumbo frames:
    • Jumbo basic frames—the payload length is between 46 (0x2E) and the value specified in the MAX_RX_SIZE_CONFIG register minus 18 bytes.
    • Jumbo VLAN tagged frames—the payload length is between 42 (0x2A) and the value specified in the MAX_RX_SIZE_CONFIG register minus 22 bytes.
    • Jumbo stacked VLAN tagged frames—the payload length is between 38 (0x26) and the value specified in the MAX_RX_SIZE_CONFIG register minus 26 bytes.

The RX MAC does not drop frames with invalid length or invalid payload length. If the frame or payload length is not valid, the MAC function asserts output error bits.

  • l1_rx_error[2]—Undersized frame.
  • l1_rx_error[3]—Oversized frame.
  • l1_rx_error[4]—Payload length error.

If the length field value is greater than the actual payload length, the IP core asserts l1_rx_error[4] . If the length field value is less than the actual payload length, the MAC RX considers the frame to have excessive padding and does not assert l1_rx_error[4] .

Note: Starting from Intel® Quartus® Prime Pro Edition software version 20.3 onwards, the MAC has a counter limit of 0xFFFF. For frames with size larger than this value, the MAC asserts oversized frame error regardless of the value programmed into MAX_RX_SIZE_CONFIG. This applies to the TX datapath as well.