Re: rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
Date: Sat, 26 Apr 2025 00:03:12 UTC
Directly from console:
% iperf3 -c hp -R
Connecting to host hp, port 5201
Reverse mode, remote host hp is sending
[ 5] local 192.168.1.82 port 35544 connected to 192.168.1.100 port 5201
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (6196 bytes)
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (6196 bytes)
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (6196 bytes)
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.06 sec 0.00 Bytes 0.00 bits/sec
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (4672 bytes)
[ 5] 1.06-2.00 sec 0.00 Bytes 0.00 bits/sec
[ 5] 2.00-3.03 sec 0.00 Bytes 0.00 bits/sec
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (6196 bytes)
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (6196 bytes)
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (4672 bytes)
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (6196 bytes)
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (6196 bytes)
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (6196 bytes)
[ 5] 3.03-4.01 sec 0.00 Bytes 0.00 bits/sec
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (6196 bytes)
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (6196 bytes)
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (6196 bytes)
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (4672 bytes)
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (6196 bytes)
[ 5] 4.01-5.05 sec 0.00 Bytes 0.00 bits/sec
[ 5] 5.05-6.06 sec 0.00 Bytes 0.00 bits/sec
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (4672 bytes)
[ 5] 6.06-7.06 sec 128 KBytes 1.05 Mbits/sec
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (4672 bytes)
[ 5] 7.06-8.06 sec 256 KBytes 2.10 Mbits/sec
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf (6196 bytes)
rtwn0: rtwn_rx_copy_to_mbuf: could not allocate RX mbuf
Adrian Chadd <adrian.chadd@gmail.com> escreveu (sábado, 26/04/2025 à(s) 00:51):
>
> change
>
> __func__);
>
> to
>
> __func__, totlen);
>
>
> On Fri, 25 Apr 2025 at 16:30, Nuno Teixeira <eduardo@freebsd.org> wrote:
>>
>> (...)
>>
>> kk, it builds fine without patch.
>>
>> Sending logs of the patch (as gmail ruins formating) and kernel.log attached.
>>
>> Nuno Teixeira <eduardo@freebsd.org> escreveu (sábado, 26/04/2025 à(s) 00:18):
>> >
>> > Hum build kernel is failing with:
>> >
>> > diff --git a/sys/dev/rtwn/usb/rtwn_usb_rx.c b/sys/dev/rtwn/usb/rtwn_usb_rx.c
>> > index 657d6bdeb9e4..15e7da2b1968 100644
>> > --- a/sys/dev/rtwn/usb/rtwn_usb_rx.c
>> > +++ b/sys/dev/rtwn/usb/rtwn_usb_rx.c
>> > @@ -126,7 +126,7 @@ rtwn_rx_copy_to_mbuf(struct rtwn_softc *sc, struct
>> > rtwn_rx_stat_common *stat,
>> >
>> > m = m_get2(totlen, M_NOWAIT, MT_DATA, M_PKTHDR);
>> > if (__predict_false(m == NULL)) {
>> > - device_printf(sc->sc_dev, "%s: could not allocate RX mbuf\n",
>> > + device_printf(sc->sc_dev, "%s: could not allocate RX
>> > mbuf (%d bytes)\n",
>> > __func__);
>> > goto fail;
>> > }
>> >
>> > I will rebuild it again without patch and check what is the problem
>> >
>> > Nuno Teixeira <eduardo@freebsd.org> escreveu (sábado, 26/04/2025 à(s) 00:12):
>> > >
>> > > I'm compiling and soon I will reboot.
>> > > Do the tests the same way and previous email or just trigger error and
>> > > capture logs?
>> > >
>> > > Adrian Chadd <adrian.chadd@gmail.com> escreveu (sábado, 26/04/2025 à(s) 00:04):
>> > > >
>> > > >
>> > > >
>> > > > On Fri, 25 Apr 2025 at 16:03, Nuno Teixeira <eduardo@freebsd.org> wrote:
>> > > >>
>> > > >> > edit sys/dev/rtwn/usb/usb_rtwn_rx.c ,around line 129. Change that device_printf() line to
>> > > >> >
>> > > >> > device_printf(sc->sc_dev, "%s: could not allocate RX mbuf (%d bytes)\n",
>> > > >> > __func__, totlen);
>> > > >>
>> > > >> # cd /usr/src
>> > > >> # find . -name "*rtwn_rx.c"
>> > > >> ./sys/dev/rtwn/if_rtwn_rx.c
>> > > >>
>> > > >> Where is sys/dev/rtwn/usb/usb_rtwn_rx.c ?
>> > > >>
>> > > >
>> > > > /usr/src/sys/dev/rtwn/usb/rtwn_usb_rx.c
>> > > >
>> > > > sorry, typo. :-0
>> > > >
>> > > >
>> > > >
>> > > > -adrian
>> > > >
>> > > >>
>> > > >> --
>> > > >> Nuno Teixeira
>> > > >> FreeBSD UNIX: <eduardo@FreeBSD.org> Web: https://FreeBSD.org
>> > >
>> > >
>> > >
>> > > --
>> > > Nuno Teixeira
>> > > FreeBSD UNIX: <eduardo@FreeBSD.org> Web: https://FreeBSD.org
>> >
>> >
>> >
>> > --
>> > Nuno Teixeira
>> > FreeBSD UNIX: <eduardo@FreeBSD.org> Web: https://FreeBSD.org
>>
>>
>>
>> --
>> Nuno Teixeira
>> FreeBSD UNIX: <eduardo@FreeBSD.org> Web: https://FreeBSD.org
--
Nuno Teixeira
FreeBSD UNIX: <eduardo@FreeBSD.org> Web: https://FreeBSD.org