Length checking, Length checking –13 – Altera 10-Gbps Ethernet MAC MegaCore Function User Manual
Page 80

Chapter 7: Functional Description
7–13
Receive Datapath
February 2014
Altera Corporation
10-Gbps Ethernet MAC MegaCore Function User Guide
If the length/type is less than payload, the MAC RX considers the frame to have
excessive padding and does not assert avalon_st_rx_error[4]. For detailed
information about the MAC behavior, refer to
.
7.5.6. Length Checking
The MAC RX checks the frame and payload lengths of basic, VLAN tagged, and
stacked VLAN tagged frames.
The frame length must be at least 64 (0x40) bytes and not exceed the following
maximum value for the different frame types:
■
Basic—The value in the
rx_frame_maxlength
register.
■
VLAN tagged—The value in the
rx_frame_maxlength
register plus four bytes.
■
Stacked VLAN tagged—The value in the
rx_frame_maxlength
register plus eight
bytes.
The MAC RX keeps track of the actual payload length as it receives a frame and
checks the actual payload length against the length/type or client length/type field.
The payload length must be between 46 (0x2E) and 1500 (0x5DC). For VLAN and
VLAN stacked frames, the minimum payload length is 42 (0x2A) or 38 (0x26)
respectively and not exceeding the maximum value of 1500 (0x5DC).
The MAC RX does not drop frames with invalid length. For the following length
violations, the MAC RX sets the corresponding error bit to 1:
■
avalon_st_rx_error[2]
—Undersized frame
■
avalon_st_rx_error[3]
—Oversized frame
■
avalon_st_rx_error[4]
—Invalid payload length, the actual payload length
doesn't match the value of the length/type field
Table 7–2. MAC Behavior for Different Frame Types
Category
Packet Size
Length/Type =
Payload
Length/Type >
Payload
Length/Type <
Payload
MAC Behavior
Frame Drop
avalon_st_rx_error [x]
Normal
Packet
65–1518
Yes
No
No
No
No
No
Yes
No
No
avalon_st_rx_error[4] = 1
No
No
Yes
No
No
Undersized Packet < 64
Yes
No
No
No
avalon_st_rx_error[2] = 1
No
Yes
No
No
No
avalon_st_rx_error[2] = 1
avalon_st_rx_error[4] = 1
No
No
Yes
No
avalon_st_rx_error[2] = 1
Oversized
1518 < Packet
< 1535
Yes
No
No
No
avalon_st_rx_error[3] = 1
No
Yes
No
No
No
avalon_st_rx_error[3] = 1
avalon_st_rx_error[4] = 1
No
No
Yes
No
avalon_st_rx_error[3] = 1