Hello,

As I can reproduce this on my amd64 laptop too, I'll will test from
here instead of rpi4 that is using RTL8821AU mode 11ng stable.

On my laptop, RTL8811AU shows:

A: wlanstat before connections
B: run iperf3 -R (-R is the fastest way to reproduce)
C: wlanstats after iperf3

A:
% wlanstats
1                 rx discard mgt frames
2                 rx ctrl frames
1996              rx beacon frames
18048             rx element unknown
13                rx frame chan mismatch
1                 active scans started
28                ccmp crypto done in s/w
2017              rx management frames
2                 rx action frames
304               A-MSDU frames received
207               A-MPDU frames held in reorder q
2                 A-MPDU BAR rx successful
207               A-MPDU frames rx out-of-order
2                 A-MPDU frames discarded for out of range seqno
204               A-MPDU frames sent up due to old age
2109              total data frames received
2081              unicast data frames received
28                multicast data frames received
1983              total data frames transmit
1983              unicast data frames sent
180.0M            current transmit rate
20.5              current rssi
-95               current noise floor (dBm)
-74.5             current signal (dBm)

B:
% iperf3 -c hp -R
Connecting to host hp, port 5201
Reverse mode, remote host hp is sending
[  5] local 192.168.1.82 port 46048 connected to 192.168.1.100 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.01   sec  0.00 Bytes  0.00 bits/sec
[  5]   1.01-2.01   sec  0.00 Bytes  0.00 bits/sec
[  5]   2.01-3.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   3.00-4.00   sec   384 KBytes  3.15 Mbits/sec
[  5]   4.00-5.00   sec   256 KBytes  2.10 Mbits/sec
[  5]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   6.00-7.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   8.00-9.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   9.00-10.00  sec  0.00 Bytes  0.00 bits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   768 KBytes   629 Kbits/sec   42            sender
[  5]   0.00-10.00  sec   640 KBytes   524 Kbits/sec                  receiver

rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf

C:
% wlanstats
1                 rx discard mgt frames
2                 rx ctrl frames
3535              rx beacon frames
31899             rx element unknown
13                rx frame chan mismatch
1                 active scans started
47                ccmp crypto done in s/w
3557              rx management frames
3                 rx action frames
761               A-MSDU frames received
266               A-MPDU frames held in reorder q
2                 A-MPDU BAR rx successful
266               A-MPDU frames rx out-of-order
2                 A-MPDU frames discarded for out of range seqno
262               A-MPDU frames sent up due to old age
3836              total data frames received
3789              unicast data frames received
47                multicast data frames received
3339              total data frames transmit
3339              unicast data frames sent
180.0M            current transmit rate
22.0              current rssi
-95               current noise floor (dBm)
-73.0             current signal (dBm)

Adrian Chadd <adrian.ch...@gmail.com> escreveu (sexta, 25/04/2025 à(s) 22:12):
>
> Hm, knowing if its NIC or VHT/11ac specific would be good.
>
> What's "wlanstats -i wlan0" show before and after you've done a bunch of test 
> traffic?
>
> "Could not allocate mbuf" is a pretty big warning too, I don't think I've 
> changed anything in the TX/RX paths to mess with that.
>
> I'll do some iperf testing tonight.
>
>
> -adrian
>
>
> On Fri, 25 Apr 2025 at 05:40, Nuno Teixeira <edua...@freebsd.org> wrote:
>>
>> (...)
>>
>> Also I see in recent world the following warning:
>>
>> Apr 25 13:29:15 rpi4 wpa_supplicant[3729]: Successfully initialized
>> wpa_supplicant
>> Apr 25 13:29:15 rpi4 wpa_supplicant[3729]: ioctl[SIOCS80211, op=20,
>> val=0, arg_len=7]: Invalid argument
>>
>> I've tried a older rtwn 11n dongle and I can't reproduce it.
>> I suppose that this only happens in 11ac mode.
>>
>>
>> Nuno Teixeira <edua...@freebsd.org> escreveu (sexta, 25/04/2025 à(s) 13:00):
>> >
>> > Hello,
>> >
>> > The oldest BE that I have in aarch64 is from
>> > main-n276312-487c7245a789: Tue Apr  8
>> >
>> > iperf3 -c 192.168.1.100
>> > Connecting to host 192.168.1.100, port 5201
>> > [  5] local 192.168.1.102 port 28643 connected to 192.168.1.100 port 5201
>> > [ ID] Interval           Transfer     Bitrate         Retr  Cwnd
>> > [  5]   0.00-1.03   sec  6.62 MBytes  53.8 Mbits/sec    9   92.0 KBytes
>> > [  5]   1.03-2.00   sec  6.38 MBytes  55.2 Mbits/sec    6   94.8 KBytes
>> > [  5]   2.00-3.00   sec  6.50 MBytes  54.5 Mbits/sec    9    102 KBytes
>> > [  5]   3.00-4.00   sec  6.50 MBytes  54.5 Mbits/sec    2   98.8 KBytes
>> > [  5]   4.00-5.00   sec  6.62 MBytes  55.6 Mbits/sec   14    105 KBytes
>> > [  5]   5.00-6.00   sec  6.50 MBytes  54.5 Mbits/sec   31    119 KBytes
>> > [  5]   6.00-7.00   sec  6.62 MBytes  55.6 Mbits/sec    3    123 KBytes
>> > [  5]   7.00-8.00   sec  6.50 MBytes  54.5 Mbits/sec   20    123 KBytes
>> > [  5]   8.00-9.00   sec  6.62 MBytes  55.6 Mbits/sec    4    127 KBytes
>> > [  5]   9.00-10.00  sec  6.38 MBytes  53.5 Mbits/sec   59   71.4 KBytes
>> > - - - - - - - - - - - - - - - - - - - - - - - - -
>> > [ ID] Interval           Transfer     Bitrate         Retr
>> > [  5]   0.00-10.00  sec  65.2 MBytes  54.7 Mbits/sec  157            sender
>> > [  5]   0.00-10.01  sec  65.0 MBytes  54.5 Mbits/sec                  
>> > receiver
>> >
>> > In iperf3 -R mode, I can reproduce the current problem:
>> >
>> > % iperf3 -c 192.168.1.100 -R
>> > Connecting to host 192.168.1.100, port 5201
>> > Reverse mode, remote host 192.168.1.100 is sending
>> > [  5] local 192.168.1.102 port 37659 connected to 192.168.1.100 port 5201
>> > [ ID] Interval           Transfer     Bitrate
>> > [  5]   0.00-1.02   sec  0.00 Bytes  0.00 bits/sec
>> > [  5]   1.02-2.04   sec  0.00 Bytes  0.00 bits/sec
>> > [  5]   2.04-3.06   sec  0.00 Bytes  0.00 bits/sec
>> > [  5]   3.06-4.01   sec  0.00 Bytes  0.00 bits/sec
>> > [  5]   4.01-5.00   sec  0.00 Bytes  0.00 bits/sec
>> > [  5]   5.00-6.00   sec   384 KBytes  3.15 Mbits/sec
>> > [  5]   6.00-7.00   sec  1.00 MBytes  8.38 Mbits/sec
>> > [  5]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec
>> > [  5]   8.00-9.00   sec  0.00 Bytes  0.00 bits/sec
>> > [  5]   9.00-10.01  sec  0.00 Bytes  0.00 bits/sec
>> > - - - - - - - - - - - - - - - - - - - - - - - - -
>> > [ ID] Interval           Transfer     Bitrate         Retr
>> > [  5]   0.00-10.01  sec  1.38 MBytes  1.15 Mbits/sec   24            sender
>> > [  5]   0.00-10.01  sec  1.38 MBytes  1.15 Mbits/sec                  
>> > receiver
>> >
>> > rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
>> > rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
>> > rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
>> > rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
>> > rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
>> > rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
>> > rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
>> > rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
>> >
>> > Maybe in the time of this world I didn't notived any warning/errors
>> > since connection was funcional.
>> >
>> > Cheers,
>> >
>> > Adrian Chadd <adrian.ch...@gmail.com> escreveu (sexta, 25/04/2025 à(s) 
>> > 03:28):
>> > >
>> > > hi,
>> > >
>> > > Ok, can you just try a straight up freebsd-head from two weeks ago and 
>> > > see if that changes the behaviour? That's odd, I'm not seeing any issues 
>> > > locally.
>> > > Let's try to narrow down when things did and didn't work and we can move 
>> > > forward along the net80211/rtwn changes from there!
>> > >
>> > >
>> > > -adrian
>> > >
>> > >
>> > > On Thu, 24 Apr 2025 at 14:31, Nuno Teixeira <edua...@freebsd.org> wrote:
>> > >>
>> > >> (...)
>> > >>
>> > >> kldstat
>> > >> 25    1 0xffffffff845be000     f017 if_rtwn_usb.ko
>> > >> 26    1 0xffffffff845ce000    1b140 rtwn.ko
>> > >>
>> > >> Nuno Teixeira <edua...@freebsd.org> escreveu (quinta, 24/04/2025 à(s) 
>> > >> 22:29):
>> > >> >
>> > >> > freebsd
>> > >> >
>> > >> > wlans_rtwn0="wlan0"
>> > >> > ifconfig_wlan0="WPA SYNCDHCP up"
>> > >> > create_args_wlan0="country PT regdomain ETSI"
>> > >> >
>> > >> > Adrian Chadd <adrian.ch...@gmail.com> escreveu (quinta, 24/04/2025 
>> > >> > à(s) 22:06):
>> > >> > >
>> > >> > >
>> > >> > >
>> > >> > > On Thu, 24 Apr 2025 at 13:41, Nuno Teixeira <edua...@freebsd.org> 
>> > >> > > wrote:
>> > >> > >>
>> > >> > >> Hey!
>> > >> > >>
>> > >> > >> I remember having both cards working fine maybe in the last 3-5 
>> > >> > >> days.
>> > >> > >> I've spoted that someting isn't right wuth git taking too long too 
>> > >> > >> pull.
>> > >> > >>
>> > >> > >> this is my /boot/loader.conf.local:
>> > >> > >>
>> > >> > >> compat.linuxkpi.80211.hw_crypto=1
>> > >> > >> compat.linuxkpi.iwlwifi_disable_11ac=0
>> > >> > >> compat.linuxkpi.iwlwifi_11n_disable=0
>> > >> > >> wlan_amrr_load="YES"
>> > >> > >>
>> > >> > >
>> > >> > > Are you using the linux driver or the freebsd rtwn driver?
>> > >> > >
>> > >> > >
>> > >> > >
>> > >> > > -adrian
>> > >> > >
>> > >> > >>
>> > >> > >> Cheers,
>> > >> > >>
>> > >> > >> Adrian Chadd <adrian.ch...@gmail.com> escreveu (quinta, 24/04/2025 
>> > >> > >> à(s) 21:34):
>> > >> > >> >
>> > >> > >> >
>> > >> > >> >
>> > >> > >> > On Thu, 24 Apr 2025 at 04:05, Nuno Teixeira 
>> > >> > >> > <edua...@freebsd.org> wrote:
>> > >> > >> >>
>> > >> > >> >> Hello,
>> > >> > >> >>
>> > >> > >> >> At main-n276705-e3e55936ce3b: Wed Apr 23, rtwn driver became 
>> > >> > >> >> almost
>> > >> > >> >> useless on my amd64 and aarch64.
>> > >> > >> >>
>> > >> > >> >> Tested with RTL8811AU and RTL8821AU usb dongles.
>> > >> > >> >
>> > >> > >> >
>> > >> > >> > hi!
>> > >> > >> >
>> > >> > >> > I'm using them at home and they're fine! So I am testing these!
>> > >> > >> >
>> > >> > >> > Do you know when it was last OK for you?
>> > >> > >> >
>> > >> > >> >
>> > >> > >> >
>> > >> > >> > -adrian
>> > >> > >> >
>> > >> > >> >
>> > >> > >> >
>> > >> > >> >>
>> > >> > >> >>
>> > >> > >> >> Should I open a PR?
>> > >> > >> >> Any tips to debug this?
>> > >> > >> >>
>> > >> > >> >> Thanks,
>> > >> > >> >>
>> > >> > >> >> `git pull --rebase` takes too long time to complete and 
>> > >> > >> >> sometimes fails.
>> > >> > >> >>
>> > >> > >> >> iperf3 shows bellow resilts on amd64/aarch64 with both cards.
>> > >> > >> >>
>> > >> > >> >> % iperf3 -c hp -R
>> > >> > >> >> Connecting to host hp, port 5201
>> > >> > >> >> Reverse mode, remote host hp is sending
>> > >> > >> >> [  5] local 192.168.1.82 port 43550 connected to 192.168.1.100 
>> > >> > >> >> port 5201
>> > >> > >> >> [ ID] Interval           Transfer     Bitrate
>> > >> > >> >> [  5]   0.00-1.00   sec  0.00 Bytes  0.00 bits/sec
>> > >> > >> >> [  5]   1.00-2.06   sec  0.00 Bytes  0.00 bits/sec
>> > >> > >> >> [  5]   2.06-3.00   sec   128 KBytes  1.11 Mbits/sec
>> > >> > >> >> [  5]   3.00-4.03   sec   128 KBytes  1.02 Mbits/sec
>> > >> > >> >> [  5]   4.03-5.01   sec  0.00 Bytes  0.00 bits/sec
>> > >> > >> >> [  5]   5.01-6.01   sec   256 KBytes  2.10 Mbits/sec
>> > >> > >> >> [  5]   6.01-7.06   sec  0.00 Bytes  0.00 bits/sec
>> > >> > >> >> [  5]   7.06-8.06   sec  0.00 Bytes  0.00 bits/sec
>> > >> > >> >> [  5]   8.06-9.01   sec  0.00 Bytes  0.00 bits/sec
>> > >> > >> >> [  5]   9.01-10.01  sec   128 KBytes  1.04 Mbits/sec
>> > >> > >> >> - - - - - - - - - - - - - - - - - - - - - - - - -
>> > >> > >> >> [ ID] Interval           Transfer     Bitrate         Retr
>> > >> > >> >> [  5]   0.00-10.01  sec   768 KBytes   628 Kbits/sec  156       
>> > >> > >> >>      sender
>> > >> > >> >> [  5]   0.00-10.01  sec   640 KBytes   524 Kbits/sec            
>> > >> > >> >>       receiver
>> > >> > >> >>
>> > >> > >> >> iperf Done.
>> > >> > >> >>
>> > >> > >> >> --
>> > >> > >> >> Nuno Teixeira
>> > >> > >> >> FreeBSD UNIX:  <edua...@freebsd.org>   Web:  https://FreeBSD.org
>> > >> > >> >>
>> > >> > >>
>> > >> > >>
>> > >> > >> --
>> > >> > >> Nuno Teixeira
>> > >> > >> FreeBSD UNIX:  <edua...@freebsd.org>   Web:  https://FreeBSD.org
>> > >> >
>> > >> >
>> > >> >
>> > >> > --
>> > >> > Nuno Teixeira
>> > >> > FreeBSD UNIX:  <edua...@freebsd.org>   Web:  https://FreeBSD.org
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> Nuno Teixeira
>> > >> FreeBSD UNIX:  <edua...@freebsd.org>   Web:  https://FreeBSD.org
>> >
>> >
>> >
>> > --
>> > Nuno Teixeira
>> > FreeBSD UNIX:  <edua...@freebsd.org>   Web:  https://FreeBSD.org
>>
>>
>>
>> --
>> Nuno Teixeira
>> FreeBSD UNIX:  <edua...@freebsd.org>   Web:  https://FreeBSD.org



-- 
Nuno Teixeira
FreeBSD UNIX:  <edua...@freebsd.org>   Web:  https://FreeBSD.org

Reply via email to