From nobody Fri Apr 25 21:38:17 2025 X-Original-To: freebsd-wireless@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZkmRn389qz5t6F3 for ; Fri, 25 Apr 2025 21:38:29 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZkmRn14csz3t82 for ; Fri, 25 Apr 2025 21:38:29 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745617109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aOamam2P5oWWhS9VgjKiyCeiQPyTzo+e7HdLHEVyeO0=; b=fpbKLxfBF+QwjgxoYbvqG9IbgOL27+um84EEqVEr2n/vAS3hs5HPreSjJ360csNGlL7FZt RraoOnqY/+f9Pim21Ki4LlzOzHMVAOPcHo6f0NER8c2CTbpkYlTgKgUZH89Mkit2q+pZ9N ANaegFa7yTm+KIsgdAZNTZr11Pddh8suqlcg1PhI8PsqB95R1TGH5Rl0V5pIuAABifx451 gQX+3vELCdAhvUSttFv5sEApxeBLlGJZlDpNqj7DHazFEg/RUpNayQXb58jKVQqZnSAI12 auJbdsv48g/YUtX4S9WPGTzJ2Mb1mwfkcgdBbbnnKo+l3hnuoSIF2LL5zilq0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745617109; a=rsa-sha256; cv=none; b=Bc6ZqT4H4GZWDgAthMH1uG2l6CsFhU2eCUI17G4POFRqNxDwTOlpCjPbeVCbLjk32z96KL 5c6Fak23EepMpl8IwjYbgGCZ2MLSjqzHckWfvcg798Dy0EW86qN6A8iZ9PEl1rNAX2tUuY W3E4445BObbsDcSJ4lBzwqQeK2QzZBLFhnktP2ZkmwGwHhodLFpDDrr85SZ9O6fifmKHqh uNcPt8QKOc42LPPydXyX1iwFT4PWpanTjfbushvxGVETO2BFnXWytWIe98I3Fcr3aBIOY/ EZJpj+HTi40j/se+wzQikRFWev9GT9kh8c3fWADA9Chsba7i7m+A7jfXRxyaqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745617109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aOamam2P5oWWhS9VgjKiyCeiQPyTzo+e7HdLHEVyeO0=; b=oBIO1/0kg2ac0vSMia5Rl1F5BXQqrMEehfonYktXqyqwkCKxSRH6w9k0Dh68LnFh7K0C8y xQRmn1ww5LAd1m6TjJIhTfzYH9J6lR6F9ilkEzLM/WWNFyViIfggfBtyJ/xZWkcdjd34/B WuesRNiVSCVc/EnAIs571cw7MY7c8D7U76D/QWWYFSdUpInm1zF+HE9ugZxZ6a7iTtfnuW OMf6mo4M1fdNhMdpNBREEBxUjA+fcN1SEqjd8ZGcCmbL6ixmvorzvrwdEmrVSZkqtDJDPp KOdrirL7PcGK1WEm9ejpFmEMe3oI28fIy3euADS+pFN6WD5S9Pe7FxH8PvyCYw== Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZkmRm6MdlzPXG for ; Fri, 25 Apr 2025 21:38:28 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qt1-f180.google.com with SMTP id d75a77b69052e-476c7ce7a6fso1535361cf.1 for ; Fri, 25 Apr 2025 14:38:28 -0700 (PDT) X-Gm-Message-State: AOJu0Yyos7YdnTfUB+Z7V3AvjP2xUxdiHkpidPRflnhxvyJbcHAOs2Df 3U768V5kdDQvLaB74pj1K5mzvfEr4OCaK/nTorQk37PL2sQeJNLo7b8yktmucR7ForwtJpLqa8i yYsIVJw6ST2sxeurAn8ZOGrBFslk= X-Google-Smtp-Source: AGHT+IEBubqzQJOyPA607V3evIs0YUAod1eaVQ1Bquo9nXIyIgj6Xodt5a1S7UcsxVnjDRa5g07UBoqmXzsUvm8fYGI= X-Received: by 2002:a05:622a:118a:b0:474:f369:8dd4 with SMTP id d75a77b69052e-4801c98432fmr19144201cf.4.1745617108440; Fri, 25 Apr 2025 14:38:28 -0700 (PDT) List-Id: Discussions List-Archive: https://lists.freebsd.org/archives/freebsd-wireless List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-wireless@freebsd.org Sender: owner-freebsd-wireless@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Nuno Teixeira Date: Fri, 25 Apr 2025 22:38:17 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: ATxdqUEpJ1No77wrj8Z6HI3A-y1Bg5hqjDLCZWU5j7VFE_03ZgcweBMaBa2locw Message-ID: Subject: Re: rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf To: Adrian Chadd Cc: freebsd-wireless@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 recei= ver 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 escreveu (sexta, 25/04/2025 =C3=A0(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 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=3D20, >> val=3D0, arg_len=3D7]: 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 escreveu (sexta, 25/04/2025 =C3=A0(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 5= 201 >> > [ ID] Interval Transfer Bitrate Retr Cwnd >> > [ 5] 0.00-1.03 sec 6.62 MBytes 53.8 Mbits/sec 9 92.0 KByte= s >> > [ 5] 1.03-2.00 sec 6.38 MBytes 55.2 Mbits/sec 6 94.8 KByte= s >> > [ 5] 2.00-3.00 sec 6.50 MBytes 54.5 Mbits/sec 9 102 KByte= s >> > [ 5] 3.00-4.00 sec 6.50 MBytes 54.5 Mbits/sec 2 98.8 KByte= s >> > [ 5] 4.00-5.00 sec 6.62 MBytes 55.6 Mbits/sec 14 105 KByte= s >> > [ 5] 5.00-6.00 sec 6.50 MBytes 54.5 Mbits/sec 31 119 KByte= s >> > [ 5] 6.00-7.00 sec 6.62 MBytes 55.6 Mbits/sec 3 123 KByte= s >> > [ 5] 7.00-8.00 sec 6.50 MBytes 54.5 Mbits/sec 20 123 KByte= s >> > [ 5] 8.00-9.00 sec 6.62 MBytes 55.6 Mbits/sec 4 127 KByte= s >> > [ 5] 9.00-10.00 sec 6.38 MBytes 53.5 Mbits/sec 59 71.4 KByte= s >> > - - - - - - - - - - - - - - - - - - - - - - - - - >> > [ ID] Interval Transfer Bitrate Retr >> > [ 5] 0.00-10.00 sec 65.2 MBytes 54.7 Mbits/sec 157 s= ender >> > [ 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 5= 201 >> > [ 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 s= ender >> > [ 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 escreveu (sexta, 25/04/2025 =C3= =A0(s) 03:28): >> > > >> > > hi, >> > > >> > > Ok, can you just try a straight up freebsd-head from two weeks ago a= nd 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 wr= ote: >> > >> >> > >> (...) >> > >> >> > >> kldstat >> > >> 25 1 0xffffffff845be000 f017 if_rtwn_usb.ko >> > >> 26 1 0xffffffff845ce000 1b140 rtwn.ko >> > >> >> > >> Nuno Teixeira escreveu (quinta, 24/04/2025 = =C3=A0(s) 22:29): >> > >> > >> > >> > freebsd >> > >> > >> > >> > wlans_rtwn0=3D"wlan0" >> > >> > ifconfig_wlan0=3D"WPA SYNCDHCP up" >> > >> > create_args_wlan0=3D"country PT regdomain ETSI" >> > >> > >> > >> > Adrian Chadd escreveu (quinta, 24/04/202= 5 =C3=A0(s) 22:06): >> > >> > > >> > >> > > >> > >> > > >> > >> > > On Thu, 24 Apr 2025 at 13:41, Nuno Teixeira 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=3D1 >> > >> > >> compat.linuxkpi.iwlwifi_disable_11ac=3D0 >> > >> > >> compat.linuxkpi.iwlwifi_11n_disable=3D0 >> > >> > >> wlan_amrr_load=3D"YES" >> > >> > >> >> > >> > > >> > >> > > Are you using the linux driver or the freebsd rtwn driver? >> > >> > > >> > >> > > >> > >> > > >> > >> > > -adrian >> > >> > > >> > >> > >> >> > >> > >> Cheers, >> > >> > >> >> > >> > >> Adrian Chadd escreveu (quinta, 24/04/= 2025 =C3=A0(s) 21:34): >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > On Thu, 24 Apr 2025 at 04:05, Nuno Teixeira wrote: >> > >> > >> >> >> > >> > >> >> Hello, >> > >> > >> >> >> > >> > >> >> At main-n276705-e3e55936ce3b: Wed Apr 23, rtwn driver becam= e 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 the= se! >> > >> > >> > >> > >> > >> > 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 som= etimes fails. >> > >> > >> >> >> > >> > >> >> iperf3 shows bellow resilts on amd64/aarch64 with both card= s. >> > >> > >> >> >> > >> > >> >> % 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: Web: https://FreeBS= D.org >> > >> > >> >> >> > >> > >> >> > >> > >> >> > >> > >> -- >> > >> > >> Nuno Teixeira >> > >> > >> FreeBSD UNIX: Web: https://FreeBSD.o= rg >> > >> > >> > >> > >> > >> > >> > >> > -- >> > >> > Nuno Teixeira >> > >> > FreeBSD UNIX: Web: https://FreeBSD.org >> > >> >> > >> >> > >> >> > >> -- >> > >> Nuno Teixeira >> > >> FreeBSD UNIX: Web: https://FreeBSD.org >> > >> > >> > >> > -- >> > Nuno Teixeira >> > FreeBSD UNIX: Web: https://FreeBSD.org >> >> >> >> -- >> Nuno Teixeira >> FreeBSD UNIX: Web: https://FreeBSD.org --=20 Nuno Teixeira FreeBSD UNIX: Web: https://FreeBSD.org