Page MenuHomeFreeBSD

e1000: Increase rx_buffer_size to 32b
ClosedPublic

Authored by kbowling on May 10 2022, 4:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 11, 6:04 PM
Unknown Object (File)
Jan 13 2024, 2:10 PM
Unknown Object (File)
Dec 23 2023, 3:08 AM
Unknown Object (File)
Dec 15 2023, 8:07 PM
Unknown Object (File)
Dec 12 2023, 2:00 PM
Unknown Object (File)
Nov 19 2023, 12:21 AM
Unknown Object (File)
Oct 17 2023, 4:03 AM
Unknown Object (File)
Oct 4 2023, 8:19 AM
Subscribers

Details

Summary

PR: 263896
Reported by: hannula@gmail.com

Extend the size of the local rx_buffer_size variable to account for larger buffer sizes on 82580, i350

From i350 datasheet, 6.2.10 Initialization Control 4 (LAN Base Address + Offset 0x13):
When 4 ports are enabled maximum buffer size is 36 KB. When 2 ports are
enabled maximum buffer size is 72 KB. When only a single port is enabled maximum
buffer size is 144 KB.
and 8.3:
The overall available internal buffer size in the I350 for all ports is 144 KB for receive
buffers and 80 KB for transmit Buffers. Disabled ports memory can be shared between active ports and
sharing can be asymmetric. The default buffer size for each port is loaded from the EEPROM on
initialization.

From the reporter:
But for I350 when only 2 ports are used PBA size can be set as 72KB (see datasheet RXPbsize or e1000_rxpbs_adjust_82580 function in e1000_82575.c).
In this case calculating the rx_buffer_size overflows as 0x0048 << 10 = 73728 or 0x12000 pushed into u16. It is then set as 0x2000 or 8192.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped