]> git.lizzy.rs Git - plan9front.git/commit
ether82563, ether82598, etherx550: round rbsz to multiple of 1K
authorcinap_lenrek <cinap_lenrek@felloff.net>
Sat, 12 Jan 2019 14:34:23 +0000 (15:34 +0100)
committercinap_lenrek <cinap_lenrek@felloff.net>
Sat, 12 Jan 2019 14:34:23 +0000 (15:34 +0100)
commit53275c70457ff396d52e75d953b8120618c904d1
tree539f07b2a39394329e76f29ef9e4047d06e9fe51
parentd0f824edc2fa69ab9fc9618a93fd6e3f15acb2b9
ether82563, ether82598, etherx550: round rbsz to multiple of 1K

the max packet size is configured in 1K increments on these chips,
which can result in the card receiving a 10K packet but the
driver having only allocated 9.5K of buffer. this actually caued
pool corruption with i210, i217, i218, i219, i350.

for 82598 and x550, we explicitely round rbsz to avoid similar bugs
in the future, even tho the Rbsz constant was already a multiple of
1K and is not affected by the bug.
sys/src/9/pc/ether82563.c
sys/src/9/pc/ether82598.c
sys/src/9/pc/etherx550.c