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)
Sat, Jun 27, 4:24 PM
Unknown Object (File)
Mon, Jun 22, 9:16 PM
Unknown Object (File)
Mon, Jun 22, 5:27 PM
Unknown Object (File)
Sun, Jun 21, 3:28 PM
Unknown Object (File)
Thu, Jun 18, 1:22 PM
Unknown Object (File)
May 27 2026, 7:50 AM
Unknown Object (File)
May 26 2026, 8:06 PM
Unknown Object (File)
May 19 2026, 3:54 AM
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.