]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
For re(4) controllers that uses new jumbo frame scheme(RTL8168C/D/E),
authoryongari <yongari@FreeBSD.org>
Wed, 12 Jan 2011 03:43:47 +0000 (03:43 +0000)
committeryongari <yongari@FreeBSD.org>
Wed, 12 Jan 2011 03:43:47 +0000 (03:43 +0000)
commit6881e65a56456c051544dbadb22bf0a7910aad6f
tree718b8ac23a6f407412ef75e61d7d4dd0901d8cee
parent3af73385cb78ed044e3181252a5e7e66e70bc767
For re(4) controllers that uses new jumbo frame scheme(RTL8168C/D/E),
limit maximum RX buffer size to RE_RX_DESC_BUFLEN instead of
blindly configuring it to 16KB. Due to lack of documentation, re(4)
didn't allow jumbo frame on these controllers. However it seems
controller is confused with jumbo frame such that it can DMA the
received frame to wrong address instead of splitting it into
multiple RX buffers. Of course, this caused panic.

Since re(4) does not support jumbo frames on these controllers,
make controller drop frame that is longer than RE_RX_DESC_BUFLEN
sized frame. Fortunately RTL810x controllers, which do not support
jumbo frame, have no such issues but this change also limited
maximum RX buffer size allowed to RTL810x controllers. Allowing
16KB RX buffer for controllers that have no such capability is
meaningless.

MFC after: 3 days
sys/dev/re/if_re.c