Intel 82558 Switch User Manual


 
104 Intel 8255x 10/100 Mbps Ethernet Controller Family Open Source Software Developer Manual
Host Software Interface
4. If the RU start request and S bits are set, a new RFD is created and the state is changed to
suspended.
5. If the RU state is not ready, frames should be discarded.
6. If the RU is in the ready state or has just exited the ready state, the following steps are
performed:
a. Update the SCB status word according to the new state and clear internal interrupt flags.
b. Activate the hardware interrupt signal.
6.4.3.4 No Buffer Performance Improvements (82558 and 82559)
During normal receive operation, the 82558 and 82559 treat received packets in the same manner
as the 82557. The data structures and driver-hardware interface remain unchanged. However, some
internal modifications were made for performance improvement.
In a no resources situation, the 82558 and 82559 operate differently than the 82557. In this
scenario, the 82557 starts discarding frames when it reaches a no resources or suspended state. The
82558 and 82559 start storing all incoming frames in the receive FIFO in these states. When the
FIFO is full, the next frame is marked as an overrun frame while the following frames are lost. This
enables the network device driver to react to the no resources situation and successfully receive the
following two or more frames.
6.4.3.4.1
TCP/UDP Checksum Support (82559 only)
The 82559 provides a checksum word in the receive structure if it is configured to (Section 6.4.2.3,
“Configure (010b)”). The 82557 and 82558 do not have this capability.
The checksum word is calculated on the incoming packet excluding the MAC header (first 14 bytes
of the packet) and Ethernet CRC. The checksum word is always appended at the end of the data
posted to the receive buffer(s) with the least significant byte first. If the 82559 is configured to post
the Ethernet CRC into memory, then the checksum word follows the CRC. The byte count field in
the receive memory structure(s) includes the checksum word. If software enables this feature,
software must subtract 2 bytes from the reported length of the packet to determine the actual packet
length.
If the incoming frame is a TCP or UDP packet, the device driver can accelerate the checksum word
calculation using this capability in the 82559. The driver should subtract from the 82559 checksum
word non-relevant fields within the packet, negate the result (1’s complement), and compare it to
the packet’s TCP/UDP checksum word.
The 82559 calculates the checksum word as a sum of the incoming words of the received packet
(not including the MAC header and CRC bytes). After the summation of each two words, the carry
is added to the least significant bit of the result. If the packet has an odd byte count, the last byte is
padded with 8 zeroes as its most significant bits. The following equation and example demonstrate
this:
Example 1. 82559 Checksum Calculation
Assume the following incoming Packet: SA DA Type B
0
B
1
B
2
B
3
B
4
B
5
… B
2N-2
B
2N-1
B
2N
CRC
Checksum = { B
1
B
0
+ B
3
B
2
+ C
0
+ B
5
B
4
+ C
1
+ …+ B
2N-1
B
2N-2
+ C
N-2
+
00B
2N
+ C
N-1
},
where C
0
, C
1
, … C
N-1
are the carry out results of the intermediate sum operations.