Page MenuHomeFreeBSD

rtwn: fix mbuf allocation errors in USB RX path for > 4 KiB frames
ClosedPublic

Authored by adrian on Sun, Apr 27, 11:53 PM.
Referenced Files
F115976268: D50049.diff
Thu, May 1, 3:02 AM
F115967062: D50049.diff
Thu, May 1, 12:13 AM
Unknown Object (File)
Wed, Apr 30, 11:46 AM
Unknown Object (File)
Mon, Apr 28, 8:21 PM
Unknown Object (File)
Mon, Apr 28, 8:11 PM
Unknown Object (File)
Mon, Apr 28, 8:06 PM
Unknown Object (File)
Mon, Apr 28, 10:23 AM
Subscribers

Details

Summary

We can and do receive > 4 KiB frames in the RX path (A-MSDU frames
can be up to 11KiB.) At least one user has reported seeing this
and having it break their traffic flows.

Use m_get3() to try and grab an mbuf jumbo cluster.

This may not be the best permanent solution, but it at least will
fail for frame sizes we expect to see up and including the largest
A-MPDU frame (11Kib) and keep a counter if it can't allocate, versus
just returning NULL because it's too large (and not keeping counters.)

PR: kern/286366

Diff Detail

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

Event Timeline

If you don't want to add totlen to the printf consider this Accepted.

sys/dev/rtwn/usb/rtwn_usb_rx.c
131

I start to disklike mbufs more and more. I'll need the same change in LinuxKPI. Thanks!

133

What would really be helpful for immediate debugging is to also print totlen in that statement.

add totlen, on suggestion from bz@

This revision is now accepted and ready to land.Mon, Apr 28, 11:29 AM