From owner-freebsd-bugs@freebsd.org Wed Feb 7 20:53:28 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD2DEED8503 for ; Wed, 7 Feb 2018 20:53:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 799737EB83 for ; Wed, 7 Feb 2018 20:53:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id BC1842682C for ; Wed, 7 Feb 2018 20:53:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w17KrQBd036763 for ; Wed, 7 Feb 2018 20:53:26 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w17KrQUV036759 for freebsd-bugs@FreeBSD.org; Wed, 7 Feb 2018 20:53:26 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 225408] re_rxeof erroneously returns EAGAIN, resulting in unnecessary processing Date: Wed, 07 Feb 2018 20:53:26 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: markj@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Feb 2018 20:53:28 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225408 Mark Johnston changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |markj@FreeBSD.org --- Comment #1 from Mark Johnston --- 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.=