Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1793402rdb; Wed, 31 Jan 2024 09:10:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IEy0Q4SJq5MGS3JuOBTiQbv/kPfs4B129NX1hbykA1+ulWeVgqHhuJ5tayI4jzOGA7FIsea X-Received: by 2002:a17:90a:9c13:b0:290:b361:8a9c with SMTP id h19-20020a17090a9c1300b00290b3618a9cmr2398861pjp.32.1706721031662; Wed, 31 Jan 2024 09:10:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706721031; cv=pass; d=google.com; s=arc-20160816; b=J95uiqD/5q+ScbgLAvEj+fA81eGlZBBVVM8h59+P3eDyuDYMm4bHrNd0qeVclFQ2HW sIYBlljCWeGRAgsajiIzI9Z6Sh3A0/J93gpg0dOlyGo2Nj5jmJF8V+7knf5eW2Iwnjvo OKfVlsonrP572Da4ArfJX0vLXPMBQya4vV7NjfzRIAageBXnczwiAMDl7MWDoDiHIHHK ooVC3wie4tSFU0d4yJnaM8GH4+iJ18dxlXPfHpNa18PIsMj2mn4UZJy1JsChmL0EELvT 6ulJxcOhW+pAZ9xLMAQIgwAoPwu4gEA1uFrBqA/+QZb51e7cQlkgLcLmifS8MzCdMv33 6ngw== 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=IHPM0PqTvzRWPqX9nw1RspBAUOZ1xC22nMm5upmOPMs=; fh=jksPGSpunDdxt9yBsXjubEdbaxJ9GFF0/UUw8S5N25g=; b=gVs+O8O5arApKafPbV/2Z4RNo2uN2S9QarzKsv6zDx69MroylbPTStdzr87+wg4b40 rsJd39Fb7tbJ1tIzhY6qHxpbw++aMZ1OE1TER/TMT5havfHtVgVSBViN7UGo+iaLMLkx 3z6nf+LbusdV6QjO+5B7L/GSdGCfVG1ESufYaopMoKlisBsJb3vGaBAVdE7QkhTcn1y2 fh3qzwExQkjbbvkncZ1vfCHaEPIuxNFzo7naugpsjciPA10j8RSASkca/ssnBCZHsuWX ICYQTiT4Cm6yV12pagHIBOUzZPUQ5IbwW6Asx0KE3gRNst0s8hWP7b349caP+xKfl2mR zZ2A==; 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-46866-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46866-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; AJvYcCWVxS+QXqp4XhIB5npxyVTF6CK7nLpm+z9Z33xsgGCDpUQGt//CwKW9InDsoanZXjW45ADdCx5K5MJwTlFKucMubE/yGK5ZoH9Kymu83Q== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id dt15-20020a17090afa4f00b002904e63a5a8si14253pjb.122.2024.01.31.09.10.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 09:10:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46866-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-46866-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46866-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 5CC4328932E for ; Wed, 31 Jan 2024 17:07:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2B1B12FF91; Wed, 31 Jan 2024 17:06:05 +0000 (UTC) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4C8FD12C539; Wed, 31 Jan 2024 17:06:03 +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=1706720765; cv=none; b=iOtmyN/0tHfJRBFDCcQYC59Ei4E5pzwLujs381fTRpnubc3pyhuc/8kNsFivWbMNnpydy1ypMFNVwbaj6LmD9HGwNkE+e0QefBm1x9mjbl+VR6PTxW7YEL6Swm0IKZPF6ZbJZlK4KZWLtjCjxrTr3YCB2CO/xSpt/VosaZTCyys= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706720765; c=relaxed/simple; bh=mvngnWhUGFgDKAimI+Ks/pS3pEFP764zRzb5IWxzsLU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XO+6qYdeew1F24THDOJuzp84Xr1HlaLzHQy5+WshAMjEolSPKBshv3LV6hcGYTS6v+3Ophnd+dhi9meUNvV1ZRsqDi3uFqZRW2lrBJuQ4h2qds7dHXym7dyRumRCcQqENNjXN5Mz37qKPJR+tB3UOw+ftLMuJtMcRThuEUBEM8A= 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,231,1701097200"; d="scan'208";a="196315533" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 01 Feb 2024 02:06:03 +0900 Received: from GBR-5CG2373LKG.adwin.renesas.com (unknown [10.226.92.158]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 760E440344FE; Thu, 1 Feb 2024 02:05:59 +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: [PATCH net-next 4/8] net: ravb: Always process TX descriptor ring in GbEth poll Date: Wed, 31 Jan 2024 17:05:18 +0000 Message-Id: <20240131170523.30048-5-paul.barker.ct@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131170523.30048-1-paul.barker.ct@bp.renesas.com> References: <20240131170523.30048-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 077c189bcc6f..9b0ed269e69b 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -1345,8 +1345,6 @@ static int ravb_poll_gbeth(struct napi_struct *napi, int budget) /* Clear RX interrupt */ ravb_write(ndev, ~(mask | RIS0_RESERVED), RIS0); work_done = ravb_rx_gbeth(ndev, budget, q); - if (work_done == budget) - goto out; /* Processing TX Descriptor Ring */ spin_lock_irqsave(&priv->lock, flags); @@ -1356,6 +1354,9 @@ static int ravb_poll_gbeth(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