Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1792736rdb; Wed, 31 Jan 2024 09:09:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IEvrp6Jp10TZMFmtlqIiRWVqX7dRp8lpmT5Bryx9Bl1gnZNFUBZWT7NZAMHIGUB+DnAaz6D X-Received: by 2002:a19:8c01:0:b0:50e:fe09:6597 with SMTP id o1-20020a198c01000000b0050efe096597mr41227lfd.69.1706720974166; Wed, 31 Jan 2024 09:09:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706720974; cv=pass; d=google.com; s=arc-20160816; b=c5I09C2IZCcZCX0NOH7wjjeuJwvLxQ8VYyPhKbgjM334xgnnlyG3Ylcmhk5ujf2b6Q dYah75CiRvHivFYU0EzoiQTsWbyTF/dCdh2i7zaveoSyQxU9pz39xuoZSdSAkKTISQ5j ZjpIt2suvFWJgglicQJ4SWmfilHNBATZGT7vUNO5kkIxbAdGYbKbIg+Z+WZ3FcKyH/DD a0F/r7J8a5o2daOE+H2Tk5+8+CRAcYMA4sJ2OGUL6DGFLOLwg+IrRMfEswN5D+73cSwD vY7HUX/rTUydO7iqy/334HTorstL2+F6UxXMktG8Sfdzv5SyeWrGTqRRjv16NrK79pE0 Zjww== 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=HO00wyyC5NX6XMCQeBKV1qKVzgaiUJJr6XlRbWnm6r0=; fh=PrcrxCVD4S2yrpthBdosrEJZU+wh7WF5IJcRxSkz8Vk=; b=i1CHsIhy4l17qyjsDWkWsXi17/hIaNwTDTulDqK3X35c973vqH0db/r2xVRP61wWqb 7c+XUaJF/Ts2b9+Wccph81XGj3JT07xevuaVKfIfUpzdOWCX416L5l+iNGGs1KsgpNwN fBG7VjnjEWYRBRN/bxbIijufbS8y58NA8XybvxM0cp/KzE0M6tqoUnI0OXTQJkbQM1U0 4dhpVx0mgPUJDjMKBJqaA/cpSQbr9IXojhzWOdk6fUx65RF2wD+KbxosVl/ziqDop6Gn VhJ42YJQjWI8O6CAFtHacn0kqLeDRVzGsp5S5zyS6cvjdVjNGZNnsvQJTikAhOazvzPz zBsQ==; 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-46871-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46871-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; AJvYcCU3IPNyAIm2q0Naw2IHJepXdUpIQFFbDkCD0L2lq8Iqr58OLWDgWpC9foiA3TV/Net4OK6uWwnY3ZPUUghLEK7FzEQRi/qQyjyZ++r0Jg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g17-20020a1709067c5100b00a35ffa1e2fesi2344060ejp.362.2024.01.31.09.09.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 09:09:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46871-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; 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-46871-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46871-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 am.mirrors.kernel.org (Postfix) with ESMTPS id E10031F24D1D for ; Wed, 31 Jan 2024 17:09:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4BC4213BEA3; Wed, 31 Jan 2024 17:06:22 +0000 (UTC) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 099C013BE92; Wed, 31 Jan 2024 17:06:19 +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=1706720781; cv=none; b=iTzETLdQ/DH/g/VF4PAZkUJfaS1HtnZdkIAN1r1bSSHfIVuxRBBXuBuYwSdKyt9RFXARqHauDwuOp8KYMniILK68XC2GSxnslkdedflZxP4C+4rKI7aDHfN/xuLK5zq3kyno2clctrE82iJf15XTif4sRtPyb4pdh3QFk3BagSk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706720781; c=relaxed/simple; bh=jF6SdlyJoM2o9TxNb9B6clYF182hsq5bd4yumWvNwvw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LbhEm78opwQpGpZj49Jv96yUOOyGMCfmrSYEers7/x9dMWXXOPo6PFV2TapYoUXmH7dcJ1YGytU786kirGlu7FEbW3Vm+US0jdB7U8CgEd7WQqQy7P1T33P+DSNUxaDmfZaJrsgJd7fHYv2HgqUo1OPbiOcAdvvlMep3xO+lPHk= 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="196315555" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 01 Feb 2024 02:06:19 +0900 Received: from GBR-5CG2373LKG.adwin.renesas.com (unknown [10.226.92.158]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 34ED640344FE; Thu, 1 Feb 2024 02:06:15 +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 8/8] net: ravb: Use NAPI threaded mode on 1-core CPUs with GbEth IP Date: Wed, 31 Jan 2024 17:05:22 +0000 Message-Id: <20240131170523.30048-9-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 NAPI Threaded mode (along with the previously enabled SW IRQ Coalescing) is required to improve network stack performance for single core SoCs using the GbEth IP (currently the RZ/G2L SoC family and the RZ/G3S SoC). For the RZ/G2UL, network throughput is increased by this change for all test cases except UDP TX (results obtained with iperf3): * TCP TX: 30% more throughput * TCP RX: 9.8% more throughput * UDP TX: 9.7% less throughput * UDP RX: 89% more throughput For the RZ/G3S we see improvements in network throughput similar to the RZ/G2UL. The improvement of UDP RX bandwidth for the single core SoCs (RZ/G2UL & RZ/G3S) is particularly critical. NAPI Threaded mode can be disabled at runtime via sysfs for applications where UDP TX performance is a priority. Signed-off-by: Paul Barker --- drivers/net/ethernet/renesas/ravb_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 483993ec25ba..202a3229d436 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -3029,8 +3029,11 @@ static int ravb_probe(struct platform_device *pdev) if (info->nc_queues) netif_napi_add(ndev, &priv->napi[RAVB_NC], info->poll); - if (info->needs_irq_coalesce) + if (info->needs_irq_coalesce) { netdev_sw_irq_coalesce_default_on(ndev); + if (num_present_cpus() == 1) + dev_set_threaded(ndev, true); + } /* Network device register */ error = register_netdev(ndev); -- 2.39.2