Fix endianness bug introduced in r205091.
After controller updates control word in a RX LE, driver converts it to host byte order. The checksum value in the control word is stored in big endian form by controller. r205091 didn't account for the host byte order conversion such that the checksum value was incorrectly interpreted on big endian architectures which in turn made all TCP/UDP frames dropped. Make RX checksum offload work on any architectures by swapping the checksum value. Reported by: Sreekanth M. ( kanthms <> netlogicmicro dot com ) Tested by: Sreekanth M. ( kanthms <> netlogicmicro dot com )
This commit is contained in:
parent
962be6dfb3
commit
3c5571b374
@ -3070,7 +3070,7 @@ msk_rxcsum(struct msk_if_softc *sc_if, uint32_t control, struct mbuf *m)
|
||||
default:
|
||||
return;
|
||||
}
|
||||
csum = ntohs(sc_if->msk_csum & 0xFFFF);
|
||||
csum = bswap16(sc_if->msk_csum & 0xFFFF);
|
||||
/* Checksum fixup for IP options. */
|
||||
len = hlen - sizeof(struct ip);
|
||||
if (len > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user