Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2915469rdb; Tue, 6 Feb 2024 01:20:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IE63jCC1ORy06cH0aNmaclgL1+4A3w0OE0/AxatB4sRTq5Ze9SmD+daOBMy2DMsDLqCnuaA X-Received: by 2002:a05:6a20:72a5:b0:19c:7bc4:6b0 with SMTP id o37-20020a056a2072a500b0019c7bc406b0mr1133002pzk.42.1707211216482; Tue, 06 Feb 2024 01:20:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707211216; cv=pass; d=google.com; s=arc-20160816; b=hsRFEgsFnWopU8Z/ARO40CLyeUea3ZVX+iNPBOXs1da3uXhEFJDHdMB62SbyBeM6mH DvMK+uDpigNEFV5cMEsSLaSmBcYaChH7FM7duMTllcrpVDeNsgZBTlkXqIuwxy1lxdF2 rlUdRP3JGIZU0k6TEbn2BWojZZMB5fh1p41E8f1NSYHa6W9MLIP+NDmlS+dBjqnMSoib Oi3kyohlBFC6VRSWM68PkoZ3C+wIkZ7+DRvObF1CEXN7nQTETUEZUL5e+L9wSiu2OkH9 np0fC2fyHGpNnwjVyNxpx40nAJNJreKX/1TXa3cYsoSA2vcfQEUPyj8xQKEjql1l3FUn NscA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=bnQIUEZaFRaaHLkozmOLTfBDaYHORu0QaABBrOvq5bU=; fh=K9rC/MxtZNRYEDFxA//5UkAz46eYKrM8OJyv+lwrVBc=; b=AQWQVBzPUjoV1Q7+zBgU4F4ZygTdH1RJO2T0Ru0/I8lwmFOonQZRQTypt0IrI9HiAb 7VzBJs+zsWQyGXiwq7zQ2jTfhDH9klMtU1OgovtqTQecHjWt7zz/gVcEBYg3eTEHr8ks x13phYcrzyvyC9muY3cVakfI9D3oHHj1KeLytYCApnkVORcLoGr4yKYoRCqz/x/bbrmA CaYLGrRiXmITi7mcnTod2q9Vn7ixkjx2ohabOFY4WPLNn+gpyII6nh/lOnJBU3nkv0/2 40SFAUVsZ8ZNyiSRAfu2v8TomFX0qOERTEGMmb3CQsNG6RWR7+Tj6bhujY1Qm23Ipy9i VgnQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=bp.renesas.com dmarc=pass fromdomain=bp.renesas.com); spf=pass (google.com: domain of linux-kernel+bounces-54571-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54571-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com X-Forwarded-Encrypted: i=1; AJvYcCXkIchHezmsDo+0NN1sluK3stpttEH3GNq0QCp2nXN2PaIRnyVy9HL+bL0i4Ra2wKIF0JPsgUZTmVoB72+p57ynpBmfv8p/YwnoDe5/0g== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w21-20020a170902d3d500b001d9b59a5bb3si1342536plb.137.2024.02.06.01.20.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 01:20:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54571-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=bp.renesas.com dmarc=pass fromdomain=bp.renesas.com); spf=pass (google.com: domain of linux-kernel+bounces-54571-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54571-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 279C4285748 for ; Tue, 6 Feb 2024 09:20:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C5D6F12DDAA; Tue, 6 Feb 2024 09:19:34 +0000 (UTC) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2573612D74A; Tue, 6 Feb 2024 09:19:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707211174; cv=none; b=ca8Kv5RNPKPIJA3qTdXxbPok9wu4zfzAXhuMOnOw0cGnbnnsuGqmQ5ed64SmNA4OD+O4jaLpD4bmJijeBvzicXqRDuD3BVM3+2HrT2MPV41OgfzBtrUJ6rxayr6EmKJmKIuUDIGa9ArA/cnf/oO/SNP8Y/USddeWoe0lfrjnlQE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707211174; c=relaxed/simple; bh=wMCMA52G6QYbcIfsCp50vOc4fUzt5+fBqBVJp0vQUgU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pyMfN1P0xk0HEeFOwGONIvRbUhpDco+esn955C5iOsVI3XdoiqlNBVRJ8ROOAaUty9SvMDyVca1ApJilmj0IQ2RdAYQbvkycJzkr90ItJm3tj2MNGlWzcGkDphyl3vPvxi/C2wgI8Ixp3VTQSGLZZ1Riya5JPTLfLHfsPtuA6Io= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-IronPort-AV: E=Sophos;i="6.05,246,1701097200"; d="scan'208";a="196934634" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 06 Feb 2024 18:19:30 +0900 Received: from GBR-5CG2373LKG.adwin.renesas.com (unknown [10.226.93.63]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 0011241B9447; Tue, 6 Feb 2024 18:19:26 +0900 (JST) From: Paul Barker To: Sergey Shtylyov , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Paul Barker , Yoshihiro Shimoda , Wolfram Sang , netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH net-next v2 3/7] net: ravb: Always process TX descriptor ring Date: Tue, 6 Feb 2024 09:19:05 +0000 Message-Id: <20240206091909.3191-4-paul.barker.ct@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240206091909.3191-1-paul.barker.ct@bp.renesas.com> References: <20240206091909.3191-1-paul.barker.ct@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. Signed-off-by: Paul Barker --- drivers/net/ethernet/renesas/ravb_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 20193944c143..10f11141569f 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -1349,8 +1349,6 @@ static int ravb_poll(struct napi_struct *napi, int budget) /* Clear RX interrupt */ ravb_write(ndev, ~(mask | RIS0_RESERVED), RIS0); work_done = ravb_rx(ndev, budget, q); - if (work_done == budget) - goto out; /* Processing TX Descriptor Ring */ spin_lock_irqsave(&priv->lock, flags); @@ -1360,6 +1358,9 @@ static int ravb_poll(struct napi_struct *napi, int budget) netif_wake_subqueue(ndev, q); spin_unlock_irqrestore(&priv->lock, flags); + if (work_done == budget) + goto out; + napi_complete(napi); /* Re-enable RX/TX interrupts */ -- 2.39.2