From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62EA98003B; Mon, 8 Apr 2024 14:05:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712585110; cv=none; b=qQkNIRkR9JaqnxFtU52iUrFE2MsL/jzQd0hblWDA7khN1wGygG6v0pF+OL4Mh4uzF2cQdZ5jO0KSNNKUjWG1UFHjbbcrE8zKMv7E4uef8/fqMnt0zR59j8YOmVGHyRqXQ+McFh+wTzsBMT6Qr6zw/N+8oGnLalPYvqFbcY1wxx8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712585110; c=relaxed/simple; bh=W1b+bWViIcIeEFstJRpIKYA8SA2D/B2AJdAW2zcoyCg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eJ0OvNVjKPer6JQRhGW5Pu9j15q98lTZlfB75HDDPXC2JehAhiiyCzqPzfPsulWHpYwuzaq4lBhW7JOTWp5KfhB7HtiU1zpCtjg+vCVjLRAcZc7gRBPrpL3RblJdnSQ1wfXKu0JcgVilxJBpTawI0vWqQfUK4bbl6YkW4TsvcsA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vVP9YWFe; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="vVP9YWFe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB510C433F1; Mon, 8 Apr 2024 14:05:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712585110; bh=W1b+bWViIcIeEFstJRpIKYA8SA2D/B2AJdAW2zcoyCg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vVP9YWFePw3upW+P1oqr8lrgrqp81QVo41SI7HIH0cUFzL/egTCbhfdjk6ml04bjO xIPXKRtLepGV+fbPRU95JfOKicaSl68nvDLCkxNW/ImIWqYgo8WXDOqHp/TUWXXod3 yMDMkl7iBqSvFbsI91n4BJOV5LB5UEDRoGX61q3A= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Paul Barker , Sergey Shtylyov , Paolo Abeni , Sasha Levin Subject: [PATCH 5.15 666/690] net: ravb: Always process TX descriptor ring Date: Mon, 8 Apr 2024 14:58:52 +0200 Message-ID: <20240408125423.817053740@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240408125359.506372836@linuxfoundation.org> References: <20240408125359.506372836@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Paul Barker [ Upstream commit 596a4254915f94c927217fe09c33a6828f33fb25 ] The TX queue should be serviced each time the poll function is called, even if the full RX work budget has been consumed. This prevents starvation of the TX queue when RX bandwidth usage is high. Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") Signed-off-by: Paul Barker Reviewed-by: Sergey Shtylyov Link: https://lore.kernel.org/r/20240402145305.82148-1-paul.barker.ct@bp.renesas.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- drivers/net/ethernet/renesas/ravb_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index c2fa3e9e24574..eee446e500486 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -969,12 +969,12 @@ static int ravb_poll(struct napi_struct *napi, int budget) int q = napi - priv->napi; int mask = BIT(q); int quota = budget; + bool unmask; /* Processing RX Descriptor Ring */ /* Clear RX interrupt */ ravb_write(ndev, ~(mask | RIS0_RESERVED), RIS0); - if (ravb_rx(ndev, "a, q)) - goto out; + unmask = !ravb_rx(ndev, "a, q); /* Processing TX Descriptor Ring */ spin_lock_irqsave(&priv->lock, flags); @@ -984,6 +984,9 @@ static int ravb_poll(struct napi_struct *napi, int budget) netif_wake_subqueue(ndev, q); spin_unlock_irqrestore(&priv->lock, flags); + if (!unmask) + goto out; + napi_complete(napi); /* Re-enable RX/TX interrupts */ -- 2.43.0