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=225408 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 broken even with your patch applied. In the legacy interrupt task handler we have: 2580 status = CSR_READ_2(sc, RL_ISR); 2581 CSR_WRITE_2(sc, RL_ISR, status); ... 2596 if (status & (RL_ISR_RX_OK|RL_ISR_RX_ERR|RL_ISR_FIFO_OFLOW)) 2597 rval = re_rxeof(sc, NULL); ... 2629 if ((CSR_READ_2(sc, RL_ISR) & RL_INTRS_CPLUS) || rval) { 2630 taskqueue_enqueue(taskqueue_fast, &sc->rl_inttask); 2631 return; 2632 } 2633 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 came in while processing, or rx_rxeof() returned EAGAIN, we'll reschedule the task handler, else we're done and we unmask interrupts. In the case where rx_rxeof() hit the processing limit, though, we'll only call rx_rxeof() again if another rx interrupt was raised. So it seems that this EAGAIN check really isn't accomplishing much. -- 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>
