Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Feb 2018 20:53:26 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 225408] re_rxeof erroneously returns EAGAIN, resulting in unnecessary processing
Message-ID:  <bug-225408-8-l18GhKvmHi@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-225408-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-225408-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225408

Mark Johnston <markj@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markj@FreeBSD.org

--- Comment #1 from Mark Johnston <markj@FreeBSD.org> ---
I also noticed this while adding netdump hooks to re(4). The code seems bro=
ken
even with your patch applied.

In the legacy interrupt task handler we have:

2580         status =3D CSR_READ_2(sc, RL_ISR);=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20
2581         CSR_WRITE_2(sc, RL_ISR, status);
...
2596         if (status & (RL_ISR_RX_OK|RL_ISR_RX_ERR|RL_ISR_FIFO_OFLOW))=
=20=20=20=20=20=20=20
2597                 rval =3D re_rxeof(sc, NULL);
...
2629         if ((CSR_READ_2(sc, RL_ISR) & RL_INTRS_CPLUS) || rval) {=20=20=
=20=20=20=20=20=20=20=20=20
2630                 taskqueue_enqueue(taskqueue_fast, &sc->rl_inttask);=20=
=20=20=20=20=20=20=20
2631                 return;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20
2632         }=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
2633=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20
2634         CSR_WRITE_2(sc, RL_IMR, RL_INTRS_CPLUS);

with rval initialized to 0.

So, we initially clear the bits in the ISR by writing status back, and pull
packets off the rx ring if we had received a packet. If another interrupt c=
ame
in while processing, or rx_rxeof() returned EAGAIN, we'll reschedule the ta=
sk
handler, else we're done and we unmask interrupts. In the case where rx_rxe=
of()
hit the processing limit, though, we'll only call rx_rxeof() again if anoth=
er
rx interrupt was raised. So it seems that this EAGAIN check really isn't
accomplishing much.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-225408-8-l18GhKvmHi>