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
F132676222: D49628.id154133.diff
Sat, Oct 18, 11:29 PM
F132656040: D49628.id154133.diff
Sat, Oct 18, 7:35 PM
Unknown Object (File)
Fri, Oct 17, 3:18 AM
Unknown Object (File)
Mon, Oct 6, 5:01 AM
Unknown Object (File)
Sep 15 2025, 10:05 PM
Unknown Object (File)
Sep 15 2025, 3:26 AM
Unknown Object (File)
Sep 7 2025, 11:32 AM
Unknown Object (File)
Sep 4 2025, 3:15 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.