Created attachment 156016 [details] patch r264912[1] brought initial support of rtl8188eu chips into FreeBSD, it was noted by OpenBSD developers during porting efforts that it has bad performance compared to other urtwn chips. The problem seem to be in the way the driver initialize aggregation mode: in native linux implementation USB aggregation is disabled[2] if RX DMA one is used (and it's actually used for 88 chips[3]), in FreeBSD both methods are enabled unconditionally. Attached patch boosts performance for about 10 times for me. Please review and commit if appropriate. [1] - https://svnweb.freebsd.org/base?view=revision&revision=264912 [2] - https://github.com/lwfinger/rtl8188eu/blob/master/hal/usb_halinit.c#L524 [3] - https://github.com/lwfinger/rtl8188eu/blob/master/hal/usb_halinit.c#L95
I'm not surprised. :) As I mentioned that issue on current@: http://lists.freebsd.org/pipermail/freebsd-current/2014-April/049562.html Like RTL8192CUS, RTL8188EU chips could support both dma and aggregation modes. It seems that initializing rate adaptation and descriptors setting are incorrect. I'll investigate further, thanks.
A commit references this bug: Author: kevlo Date: Thu Apr 30 02:47:22 UTC 2015 New revision: 282266 URL: https://svnweb.freebsd.org/changeset/base/282266 Log: - Disable usb aggregation mode by default since it boots performance - Minor tweak PR: 199718 Submitted by: Mikhail <mp39590 at gmail dot com> Changes: head/sys/dev/usb/wlan/if_urtwn.c
Disabling usb aggregation mode does boost performance and it turns out later Realtek chips don't usb aggregation mode. I committed it as r282266 with minor tweak, thanks.