]> www.infradead.org Git - users/dwmw2/linux.git/commit
wifi: rtw88: usb: Copy instead of cloning the RX skb
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Wed, 18 Dec 2024 22:33:20 +0000 (00:33 +0200)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 23 Dec 2024 08:05:39 +0000 (16:05 +0800)
commite9048e2935f7d797c2ba047c15b705b57c2fa99a
treef5b0926b42562838834f17da6cd59bcbfdd22c78
parent74a72c367573ad521becf6cc4d649e14387b3c64
wifi: rtw88: usb: Copy instead of cloning the RX skb

"iperf3 -c 192.168.0.1 -R --udp -b 0" shows about 40% of datagrams
are lost. Many torrents don't download faster than 3 MiB/s, probably
because the Bittorrent protocol uses UDP. This is somehow related to
the use of skb_clone() in the RX path.

Don't use skb_clone(). Instead allocate a new skb for each 802.11 frame
received and copy the data from the big (32768 byte) skb.

With this patch, "iperf3 -c 192.168.0.1 -R --udp -b 0" shows only 1-2%
of datagrams are lost, and torrents can reach download speeds of 36
MiB/s.

Tested with RTL8812AU and RTL8822CU.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/8c9d4f9d-ebd8-4dc0-a0c4-9ebe430521dd@gmail.com
drivers/net/wireless/realtek/rtw88/usb.c