Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1319831lqp; Mon, 15 Apr 2024 02:49:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV5Yj4RthHCRMXCz8pSAQlkNozdKoqp1AhQO3FgoVreznpPh+XbNVLw5HLFJSPUsJ+IywWBvgWDySwA4X62dnPFtUOWUlliNp4xLMI6gg== X-Google-Smtp-Source: AGHT+IHtlyCMgz/c5gbjlLTs6IsuCfj+GVbsa5/qOgYxesehbP7UKoiJr3tdWU+bO61R09fwGwSs X-Received: by 2002:a05:6122:250e:b0:4d4:11a6:a4ff with SMTP id cl14-20020a056122250e00b004d411a6a4ffmr5999252vkb.3.1713174591738; Mon, 15 Apr 2024 02:49:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713174591; cv=pass; d=google.com; s=arc-20160816; b=BA5hzrQqPS9aRSR/kJ0HC7OteOKQfLF0ALKf/LLqjKm5LBPe1T8gAbgV7xu/S4RRUz 3bDqX3WpJDORrJ9lhpfU1JDT5w6iWJNQTz7zvYc7xZoJBLi2SOjFtt42euLNYCqTnepC dZVNHYORMlLCq/hu+pYhsYj+9uze0TRnDcjONIxx9+G298Xc+2F6OGQG4Jc5VtOgEH/E GaHOHYUBZWddWOq304oWJTjLNE/B3qzeN2kebGf3XL/W5mh4dA4CYkOaA/tPw/vtDnZ4 gcauRRKgIqNVQHcelYqc55RBJg+ZB39O3NmqDjhKLD0fkXijCe3Vpsq6VR6jKDcSebOk Qw+w== 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=WG/PSV4UOaYT9OdNWhAh2XaK2vIDsOtFY8mvZSu6E8U=; fh=4QG8JldDsSGgNvIBKkpjxUq7EoGw0Kp2cqehO+01mDo=; b=SXXQffi56AGde7o/3aIoHR+x2Fm+tYICR5s+SNX/SzWrp9uZsyPJptrwzyduu2tORX jbbETJhlN2y+P+MzJZX/FZyXUnIf8nAelmkKEr7WqfoNHRJJtV6qP4gthzcq6yHvEYb2 UdRAeC1VebrzNRkoO2Z2OYX0DT2eoiqCHqrP/NRvjdVGN/oM+tUY/H6/rJSTWhblpxi4 K0VvRVlZiFptmTSiGdlC8aCUZZ1Akl5vnrAbGGhtRam/aULctx6hdE342dy75bNi5MK5 bAyCym315+88wVc+9y2M+/S7yKEIy4Lz7pv7a75vb/z9mvnyB3SOs22bO7cZ/+sVkSe5 26zA==; 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-144860-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144860-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id im9-20020a056214246900b0069b3622a7e1si10601262qvb.123.2024.04.15.02.49.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 02:49:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-144860-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; 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-144860-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144860-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 757371C21D26 for ; Mon, 15 Apr 2024 09:49:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E1DF57874; Mon, 15 Apr 2024 09:48:42 +0000 (UTC) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B036F5733B; Mon, 15 Apr 2024 09:48:39 +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=1713174521; cv=none; b=CnuFnJ/NevPbi4ZiNLMdjZ5s88Nh7/R4bgMUSz1ll5zkm3q9lrbzH3Ohx2P/pxUvGOilgG1tA1+MccxLSLm3eTdbT9riiNpIP78Nqzk2C2Qxlg2tscSyCH321vcDbVi5CJ/9ttHNhO5Gjup6L2yxdwC2z+g2SOT/dkGPQ6uPQis= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713174521; c=relaxed/simple; bh=0a8sFtUoHMxGNk6So9B9U41s6UQbV0WO1sQRMmFABA4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GKLl+cP1fo0rFd+r9Xf5ruEhzL7kjOkAK+K0QgIaxfPRLEuKGIZlITXRUE0T/6/0g6CNrX/EaB9Rhx+s1BH5dUmYsQFE3Wb+c7qvUIXPIHOpN3B64gNcdOnS4sS9JOwHTKsxYrRZgCpwxqujK02bHbQJ0tsB7ndueZz+2py9ps4= 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.07,202,1708354800"; d="scan'208";a="205432172" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 15 Apr 2024 18:48:39 +0900 Received: from renesas-deb12.cephei.uk (unknown [10.226.93.74]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 9386E4006DE8; Mon, 15 Apr 2024 18:48:35 +0900 (JST) From: Paul Barker To: Sergey Shtylyov , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Paul Barker , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Geert Uytterhoeven , netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [net-next RFC v3 5/7] net: ravb: Enable SW IRQ Coalescing for GbEth Date: Mon, 15 Apr 2024 10:48:02 +0100 Message-Id: <20240415094804.8016-6-paul.barker.ct@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240415094804.8016-1-paul.barker.ct@bp.renesas.com> References: <20240415094804.8016-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. This patch gives the following improvements during testing with iperf3: * RZ/G2L: * TCP RX: same bandwidth with -6% CPU load (76% -> 71%) * UDP RX: same bandwidth with -10% CPU load (99% -> 89%) * RZ/G2UL: * UDP RX: +4200% bandwidth (1.23Mbps -> 53Mbps) * RZ/G3S: * UDP RX: +425% bandwidth (1.23Mbps -> 6.46Mbps) 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 71de2a7aa27c..9c6392ade2f1 100644 --- a/drivers/net/ethernet/renesas/ravb.h +++ b/drivers/net/ethernet/renesas/ravb.h @@ -1054,6 +1054,7 @@ struct ravb_hw_info { u32 rx_max_desc_use; u32 rx_desc_size; unsigned aligned_tx: 1; + unsigned needs_irq_coalesce:1; /* Needs software IRQ coalescing */ /* hardware features */ unsigned internal_delay:1; /* AVB-DMAC has internal delays */ diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 12618171f6d5..26b70b996bd3 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -2663,6 +2663,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[] = { @@ -2937,6 +2938,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