Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Apr 2025 21:19:48 +0100
From:      Nuno Teixeira <eduardo@freebsd.org>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org,  dev-commits-src-main@freebsd.org
Subject:   Re: git: 5c74aa3abd4e - main - rtwn: enable reception of BAR frames
Message-ID:  <CAFDf7U%2BY7=uPcMsffzQhvxwKLCeXYF0mVjCw1YhPv26nh0ZB-A@mail.gmail.com>
In-Reply-To: <202504230204.53N248Jb070185@gitrepo.freebsd.org>
References:  <202504230204.53N248Jb070185@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello all,

I used to have a stable 11ac connection with Archer T2U PLUS
[RTL8821AU] on arm64 (rpi4).

world is at main-n276705-e3e55936ce3b: Wed Apr 23

I noticed that `git pull --rebase` was taking too much time and
sometimes failed.

/var/log/messages have tons of:
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf

iperf3 to local machine connected with ethernet also fails:

% iperf3 -c hp -R
Connecting to host hp, port 5201
Reverse mode, remote host hp is sending
[  5] local 192.168.1.102 port 14481 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.01   sec  0.00 Bytes  0.00 bits/sec
[  5]   3.01-4.06   sec  0.00 Bytes  0.00 bits/sec
[  5]   4.06-5.01   sec  0.00 Bytes  0.00 bits/sec
[  5]   5.01-6.04   sec  0.00 Bytes  0.00 bits/sec
[  5]   6.04-7.06   sec  0.00 Bytes  0.00 bits/sec
[  5]   7.06-8.06   sec   512 KBytes  4.21 Mbits/sec
[  5]   8.06-9.06   sec  0.00 Bytes  0.00 bits/sec
[  5]   9.06-10.04  sec  0.00 Bytes  0.00 bits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.04  sec   640 KBytes   522 Kbits/sec   30            sender
[  5]   0.00-10.04  sec   512 KBytes   418 Kbits/sec                  recei=
ver

Any clues if this related to this commit?

Thanks,

Adrian Chadd <adrian@freebsd.org> escreveu (quarta, 23/04/2025 =C3=A0(s) 03=
:04):
>
> The branch main has been updated by adrian:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=3D5c74aa3abd4e353ed7f8cb446c=
0527c8ebe15d1c
>
> commit 5c74aa3abd4e353ed7f8cb446c0527c8ebe15d1c
> Author:     Jessica Clarke <jrtc27@freebsd.org>
> AuthorDate: 2025-04-01 00:43:13 +0000
> Commit:     Adrian Chadd <adrian@FreeBSD.org>
> CommitDate: 2025-04-23 02:02:39 +0000
>
>     rtwn: enable reception of BAR frames
>
>     The RX filter wasn't enabling BAR frames, so we weren't receiving the=
m
>     during normal operation.
>
>     Jessica noticed we WERE getting BAR frames, but only when promisc mod=
e
>     is active.  Which is a different set of bugs, but it did highlight
>     the differences here.
>
>     Differential Revision:  https://reviews.freebsd.org/D49596
>     PR: kern/285822
> ---
>  sys/dev/rtwn/if_rtwn.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/sys/dev/rtwn/if_rtwn.c b/sys/dev/rtwn/if_rtwn.c
> index 7df1b78db37b..7a547e13cafa 100644
> --- a/sys/dev/rtwn/if_rtwn.c
> +++ b/sys/dev/rtwn/if_rtwn.c
> @@ -1203,6 +1203,9 @@ rtwn_newstate(struct ieee80211vap *vap, enum ieee80=
211_state nstate, int arg)
>                         /* Stop Rx of data frames. */
>                         rtwn_write_2(sc, R92C_RXFLTMAP2, 0);
>
> +                       /* Stop Rx of control frames. */
> +                       rtwn_write_2(sc, R92C_RXFLTMAP1, 0);
> +
>                         /* Reset EDCA parameters. */
>                         rtwn_write_4(sc, R92C_EDCA_VO_PARAM, 0x002f3217);
>                         rtwn_write_4(sc, R92C_EDCA_VI_PARAM, 0x005e4317);
> @@ -1374,6 +1377,11 @@ rtwn_run(struct rtwn_softc *sc, struct ieee80211va=
p *vap)
>         rtwn_write_2(sc, R92C_BCN_INTERVAL(uvp->id), ni->ni_intval);
>
>         if (sc->vaps_running =3D=3D sc->monvaps_running) {
> +               /* Enable Rx of BAR control frames. */
> +               rtwn_write_2(sc, R92C_RXFLTMAP1,
> +                   1 << (IEEE80211_FC0_SUBTYPE_BAR >>
> +                   IEEE80211_FC0_SUBTYPE_SHIFT));
> +
>                 /* Enable Rx of data frames. */
>                 rtwn_write_2(sc, R92C_RXFLTMAP2, 0xffff);
>
>


--=20
Nuno Teixeira
FreeBSD UNIX:  <eduardo@FreeBSD.org>   Web:  https://FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7U%2BY7=uPcMsffzQhvxwKLCeXYF0mVjCw1YhPv26nh0ZB-A>