Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2916183rdb; Tue, 6 Feb 2024 01:22:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IG8Mhorz8Z6RwMYD3I93sJEkp2QepWMP1SdRr3XS3PFbMRl30QTNZAO4J/s7DCDSMRAkCf8 X-Received: by 2002:a05:6871:5c7:b0:203:ef0f:7042 with SMTP id v7-20020a05687105c700b00203ef0f7042mr2122776oan.21.1707211332178; Tue, 06 Feb 2024 01:22:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707211332; cv=pass; d=google.com; s=arc-20160816; b=fn2lJFWOT8AWvySAQLw+a1yj+jPTOusy1KLJWGlGBPUXLq0MiZvW14plP7bTCJUIJt 022YjQWESa1N041lwmLkjq7zzX8VntdmSw/4/72oABGUQSafobYkh0i6j5lxWvvqiIb/ 1zec+RUQ/sovzGcXRJyf4RwHkcmnKbmfqOMxbNl5C4Ur+Kdr7pllQjprYMldyUsdeVdd gF/CQTKhSSR44ZXYZfkLy9dpjtwFKYVw/JT+kR5PwLnJdlinyQHb2uu1OHVbUaQI4soI 7fu4El/8Pz7QIF3/8zi4LSV4QSKZu0w+J/965s6lt6h1OKAkFzDlpjv3HecV31rYIWOx A1sg== 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=rfuTluO4LlL/ukcj2oNHny17ZywTMv0sKmbc4/mtTpo=; fh=0OO8DwyKx1bAb+Z+jm2LvZbUzrrkOUAop/z/RTcwLT4=; b=Lr7oy3Fx3v6r0mVvsQ8imIHKmkeji/p4DbYbmlNGFf/jjS03SgzrgWlLzS8CeTqcS1 pQNDX4jctZIXOJGyCmJ7n/zl57ylPyR7U5XTw1CySelQcS/MfGmQMU0sR0WeWJ8mcWYl G995bg2w4e0AAvVBZUsZFxM/kQl1J6Dgdl5WiSYuabv7gmk8+4RNLWn6bLc9tFVPgp68 g/qeKK303THojuhpEyD8OEs5uKWRkqfmWLmI99tcuHfuGTHBEp+8Bjuwl8PP5M5GICUn NcWQQrcQYhXBLfRDbJUcr7O7QBXRqeAS0+Nh0Ovn7LkGY4CKksrRIBXIEU/WtPR8EeLP 7f4Q==; 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-54575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54575-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; AJvYcCWTYJ6eh6soDDp9BngMLNPhqVISnZcHhx6V0zBubRbhoP891Bc4sQjo7osaia3EobZ1pFC/2uux5FvbKMetFA+cjutymvPEsAfGHaZQ5w== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c3-20020a63d503000000b005dbde340a68si1335774pgg.557.2024.02.06.01.22.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 01:22:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::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-54575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54575-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id CFF4CB23115 for ; Tue, 6 Feb 2024 09:21:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 415F212F369; Tue, 6 Feb 2024 09:19:47 +0000 (UTC) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A184012EBFA; Tue, 6 Feb 2024 09:19:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707211186; cv=none; b=kmvL59kKGPatmadeToN4eKyREwEyTpTL3Gw/YYHzw3rtykaqtuVqt7/E7RnokBriQsRCKOFXgU09fZtSEhLRfiHSwIW54y8ajXqMKypGm6dFNYgWL7sRP24L+bDBo5lk1XZMur8CN3U1t91YxNBS4TUceLmV40gmHydy92oH6n0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707211186; c=relaxed/simple; bh=K2OpG4YqvGtxSFVnu+Kxv9nWWw/e4YY7sJiQxe5ZN2I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=B20oA7PMcW72MRe7U27IsbNX3y944XoMiIJzESer4yQR7pPkLgnyIqvykqYTNtZ3X2r0irhtLxZNGUVpbM2WB/5oHplXFeFVqZE9y1jeB4SYZzAbyz7vrnd0T2BI64z67OZcP9FhjHjMpNcybWjsrWysRhjR/fA5nfHMYMuCmCw= 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.171 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="193022712" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 06 Feb 2024 18:19:43 +0900 Received: from GBR-5CG2373LKG.adwin.renesas.com (unknown [10.226.93.63]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id BFCCE41B86C7; Tue, 6 Feb 2024 18:19:39 +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 6/7] net: ravb: Enable SW IRQ Coalescing for GbEth Date: Tue, 6 Feb 2024 09:19:08 +0000 Message-Id: <20240206091909.3191-7-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 Software IRQ Coalescing is required to improve network stack performance in the RZ/G2L SoC family and the RZ/G3S SoC, i.e. the SoCs which use the GbEth IP. For the RZ/G2L, network throughput is comparable before and after this change. CPU usage during TCP RX testing dropped by 6.5% and during UDP RX testing dropped by 10%. For the RZ/G2UL, network throughput is greatly increased by this change (results obtained with iperf3): * TCP TX: 2.9% more throughput * TCP RX: 1.1% more throughput * UDP TX: similar throughput * UDP RX: 41500% 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. Signed-off-by: Paul Barker --- drivers/net/ethernet/renesas/ravb.h | 1 + drivers/net/ethernet/renesas/ravb_main.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h index 55a7a08aabef..ca7a66759e35 100644 --- a/drivers/net/ethernet/renesas/ravb.h +++ b/drivers/net/ethernet/renesas/ravb.h @@ -1078,6 +1078,7 @@ struct ravb_hw_info { unsigned nc_queues:1; /* AVB-DMAC has RX and TX NC queues */ unsigned magic_pkt:1; /* E-MAC supports magic packet detection */ unsigned half_duplex:1; /* E-MAC supports half duplex mode */ + unsigned needs_irq_coalesce:1; /* Requires SW IRQ Coalescing to achieve best performance */ }; struct ravb_private { diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 661fd86899ac..7bb80608f260 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -2639,6 +2639,7 @@ static const struct ravb_hw_info gbeth_hw_info = { .tx_counters = 1, .carrier_counters = 1, .half_duplex = 1, + .needs_irq_coalesce = 1, }; static const struct of_device_id ravb_match_table[] = { @@ -2983,6 +2984,9 @@ static int ravb_probe(struct platform_device *pdev) if (info->nc_queues) netif_napi_add(ndev, &priv->napi[RAVB_NC], ravb_poll); + if (info->needs_irq_coalesce) + netdev_sw_irq_coalesce_default_on(ndev); + /* Network device register */ error = register_netdev(ndev); if (error) -- 2.39.2