Page MenuHomeFreeBSD

rtwn: don't treat UDP/TCP checksum failure as permanent failure
ClosedPublic

Authored by adrian on Wed, Apr 2, 12:00 AM.
Referenced Files
Unknown Object (File)
Wed, Apr 23, 2:10 AM
Unknown Object (File)
Fri, Apr 18, 5:43 PM
Unknown Object (File)
Thu, Apr 17, 2:46 AM
Unknown Object (File)
Tue, Apr 15, 5:22 AM
Unknown Object (File)
Mon, Apr 14, 7:45 PM
Unknown Object (File)
Mon, Apr 14, 11:40 AM
Unknown Object (File)
Thu, Apr 3, 4:19 AM
Unknown Object (File)
Wed, Apr 2, 10:16 PM
Subscribers

Details

Summary

jrtc27@freebsd.org reported that DHCP wasn't working on some
networks. She dug into it and found that the RTL8812AU/RTL8812AU
NICs seem to be failing UDP frames w/ a zero checksum, which is
a valid "there's no checksum" checksum.

So, just pass those frames up the stack and let the IP stack
deal with it. If the hardware claims the frames did pass TCP/UDP
checksum then still mark those frames with the checksum offload
bits.

PR: kern/285387

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 63273
Build 60157: arc lint + arc unit

Event Timeline

bz added inline comments.
sys/dev/rtwn/rtl8812a/r12a_rx.c
202

If this is just UDP you could filter those errors out if I read the above debug printf correctly. Slight optimization...?

sys/dev/rtwn/rtl8812a/r12a_rx.c
202

I thought about only returning 0 for UDP + CKSUM error, but -1 for TCP + CKSUM error.

@jrtc27 wanna try changing the logic locally and make sure you don't see any weird corner cases?

This revision was not accepted when it landed; it landed in state Needs Review.Wed, Apr 23, 2:04 AM
This revision was automatically updated to reflect the committed changes.