Page MenuHomeFreeBSD

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

Authored by adrian on Apr 2 2025, 12:00 AM.
Referenced Files
Unknown Object (File)
Fri, Nov 7, 10:59 PM
Unknown Object (File)
Wed, Oct 29, 8:31 AM
Unknown Object (File)
Wed, Oct 29, 8:17 AM
Unknown Object (File)
Wed, Oct 29, 7:37 AM
Unknown Object (File)
Sat, Oct 25, 12:45 PM
Unknown Object (File)
Sat, Oct 25, 10:04 AM
Unknown Object (File)
Fri, Oct 24, 3:52 AM
Unknown Object (File)
Sat, Oct 18, 11:29 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 Not Applicable
Unit
Tests Not Applicable

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.Apr 23 2025, 2:04 AM
This revision was automatically updated to reflect the committed changes.