Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2400265rdb; Mon, 12 Feb 2024 03:53:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IH2Zq2Faw0dNg60dsl0Gk/4VaGLSgDXg00MbUEkCD9revOmtUOvGFCnj7jQbU2IMb7dem2x X-Received: by 2002:a05:620a:51d7:b0:785:469c:3f01 with SMTP id cx23-20020a05620a51d700b00785469c3f01mr6685736qkb.59.1707738780147; Mon, 12 Feb 2024 03:53:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707738780; cv=pass; d=google.com; s=arc-20160816; b=uhfFxzV2nzosZxtEYV5/Pdd75sO4nAFE9MkSy4nHMLzhtlpM5HI/qB5dRSCnJBhtJx e14+sy70Ev0/OIoOi0Vqwnmi2HqlkiYSGn0vB+EBNbd1Pj4yakZ5QRYDD8ttjzQ/MYrh KJGx+B3qQqZnkkz1C7MxjTSabhyLXCGZ6EtAkSWiTIhnPKJ1wD0CgDm5OZtbVugVhAJC ysr1Bpa/2sYOIX8IY5S0EkV6089wbNldtN1+qDKXeOIabxuhdYGeqtzQqocnofzVQSjG zRE5zcNyDIlQir26latlLSFiTN1hoxQ07pviIQwDCIxiaEI32N8rJyJqylSphoNFG66D EJUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id; bh=QeCsueXn3vJgoLDRhg1I6RX6VwXZEQvUKJ8yUvYfo8Q=; fh=g2uTmThTVkqFiw2ln6TBjWQqadTMJ/FjX2NUCjbwfdw=; b=hzOq6E5/qO/9LvEIZK9M60YC2nT7RimLD1Y8awy8UZnqanrWvyu4tg6v6ZtWL2a/cf Jk5Lutxvs038jmzNjKGZKwwthv6jnKK6s+/sglV2VrhYnBiGCH8bTLjNZ+b3wnzCvnsB V5HE6y1UPzisQ2DU1Z//0s6NvMb1VBHGzdZjq35A6eaCvDfff3ZVsXJCtVXCBhA83Y6m xEKz/UGiCKYde2pbB1NtOLxVIQ9I5mDiZBpHwku4dzTrz+BBv1N862tW/5d7x86k+EFZ jhXzTLqQ7+qJTWuiSLw3Ktb/Wdm9FNFKe5yGkZqqiUtM4LJX1tl7O5H8F2gjfICm+n7f AGsw==; 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-61459-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61459-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com X-Forwarded-Encrypted: i=2; AJvYcCVu3ZrvLWfjX3Dr9OY6eliR6ZK2erK7saMW16wWRvyJGO2kl3Si6o8ylU+bXlLkEJ/NPo4sddOx5twy54+3Z16fxhtVBkd3J1V6HUfFAg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id t25-20020a05620a0b1900b007839e747700si5598642qkg.192.2024.02.12.03.52.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 03:53:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61459-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-61459-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61459-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 D1D681C2210B for ; Mon, 12 Feb 2024 11:52:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB61939AFD; Mon, 12 Feb 2024 11:52:18 +0000 (UTC) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6536739FC6; Mon, 12 Feb 2024 11:52:14 +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=1707738738; cv=none; b=ulCZ/owdDwj/zHoox5rIhPxMhLkNkPNj8T7l4VLbayMKoDBdkJmb592QsVQNYvQq2LI7SP/7K1K8vyYyy6wBCqnfHCnk//N2YecAHODrbpg27uAVXlz5PAIoa3xhkHPzmr0RSp0BLkgwvUWieh2tCt++CXs0K9j7BblH7HHcoEk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707738738; c=relaxed/simple; bh=GpL07XAa/jm5FeLdjxYaphlLhPjYkUMyORseq7qEQyQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uF7higG8jcCK3sOx3DrCmbUswEnaw7LqInh1rdOW7XgxmAV8DY8RjAdhObEB+6Iwz24QyjDKmUzOgcAVvjAPxsPLRX/XrN1zx1amIShwa4ygjZPe0P8PU0eqRiTCfE5vRH3sWHIFedDRhg+b6vImslHb0cJuxwRXfn/JmCoQSAU= 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.06,263,1705330800"; d="asc'?scan'208";a="197569102" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 12 Feb 2024 20:52:14 +0900 Received: from [10.226.92.81] (unknown [10.226.92.81]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id E7BAC41AFAC9; Mon, 12 Feb 2024 20:52:10 +0900 (JST) Message-ID: <99a883c8-ccf2-4e52-9c34-ead59cd84117@bp.renesas.com> Date: Mon, 12 Feb 2024 11:52:09 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH net-next v2 0/7] Improve GbEth performance on Renesas RZ/G2L and related SoCs Content-Language: en-GB To: Sergey Shtylyov , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Yoshihiro Shimoda , Wolfram Sang , netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240206091909.3191-1-paul.barker.ct@bp.renesas.com> <29d9d3cb-4ac2-32e2-51b8-475d34216b07@omp.ru> From: Paul Barker In-Reply-To: <29d9d3cb-4ac2-32e2-51b8-475d34216b07@omp.ru> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------gdYqQiIth7xEUoa2x4MlHboa" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------gdYqQiIth7xEUoa2x4MlHboa Content-Type: multipart/mixed; boundary="------------YxdYTyxwde8Raj8xLdsTFczc"; protected-headers="v1" From: Paul Barker To: Sergey Shtylyov , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Yoshihiro Shimoda , Wolfram Sang , netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <99a883c8-ccf2-4e52-9c34-ead59cd84117@bp.renesas.com> Subject: Re: [RFC PATCH net-next v2 0/7] Improve GbEth performance on Renesas RZ/G2L and related SoCs References: <20240206091909.3191-1-paul.barker.ct@bp.renesas.com> <29d9d3cb-4ac2-32e2-51b8-475d34216b07@omp.ru> In-Reply-To: <29d9d3cb-4ac2-32e2-51b8-475d34216b07@omp.ru> --------------YxdYTyxwde8Raj8xLdsTFczc Content-Type: multipart/mixed; boundary="------------kG6KqVt2nm7zk2pZF5LvPf2B" --------------kG6KqVt2nm7zk2pZF5LvPf2B Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 10/02/2024 19:36, Sergey Shtylyov wrote: > On 2/6/24 12:19 PM, Paul Barker wrote: >=20 >> This series aims to improve peformance of the GbEth IP in the Renesas >=20 > You didn't fix the typo in "peformance"... :-/ >=20 >> RZ/G2L SoC family and the RZ/G3S SoC, which use the ravb driver. Along= >> the way, we do some refactoring and ensure that napi_complete_done() i= s >> used in accordance with the NAPI documentation for both GbEth and R-Ca= r >> code paths. >> >> Performance improvment mainly comes from enabling SW IRQ Coalescing fo= r >=20 > And in "improvment" too... :-/ I'll fix this and the above type in v3. >=20 >> all SoCs using the GbEth IP, and NAPI Threaded mode for single core So= Cs >> using the GbEth IP. These can be enabled/disabled at runtime via sysfs= , >> but our goal is to set sensible defaults which get good performance on= >> the affected SoCs. >> >> The performance impact of this series on iperf3 testing is as follows:= >> * RZ/G2L Ethernet throughput is unchanged, but CPU usage drops: >> * Bidirectional and TCP RX: 6.5% less CPU usage >> * UDP RX: 10% less CPU usage >> >> * RZ/G2UL and RZ/G3S Ethernet throughput is increased for all test >> cases except UDP TX, which suffers a slight loss: >> * TCP TX: 32% more throughput >> * TCP RX: 11% more throughput >> * UDP TX: 10% less throughput >> * UDP RX: 10183% more throughput - the previous throughput of >=20 > So this is a real figure? I thought you forgot to erase 10... :-) Yes, throughput went from 1.06Mbps to 109Mbps for the RZ/G2UL with these changes. Initial testing shows that goes up again to 485Mbps with the next patch series I'm working on to reduce RX buffer sizes. Biju's work on checksum offload also helps a lot with these numbers, I can't take all the credit. >=20 >> 1.06Mbps is what prompted this work. >> >> * RZ/G2N CPU usage and Ethernet throughput is unchanged (tested as a= >> representative of the SoCs which use the R-Car based RAVB IP). >> >> This series depends on: >> * "net: ravb: Let IP-specific receive function to interrogate descri= ptors" v6 >> https://lore.kernel.org/all/20240202084136.3426492-2-claudiu.bezne= a.uj@bp.renesas.com/ >=20 > This one has been merged now, so you can drop RFC... >=20 >> To get the results shown above, you'll also need: >> * "topology: Set capacity_freq_ref in all cases" >> https://lore.kernel.org/all/20240117190545.596057-1-vincent.guitto= t@linaro.org/ >> >> * "ravb: Add Rx checksum offload support" v4 >> https://lore.kernel.org/all/20240203142559.130466-2-biju.das.jz@bp= =2Erenesas.com/ >> >> * "ravb: Add Tx checksum offload support" v4 >> https://lore.kernel.org/all/20240203142559.130466-3-biju.das.jz@bp= =2Erenesas.com/ >=20 > These two have been merged too... >=20 >> Work in this area will continue, in particular we expect to improve >> TCP/UDP RX performance further with future changes to RX buffer >> handling. >> >> Changes v1->v2: >> * Marked as RFC as the series depends on unmerged patches. >> * Refactored R-Car code paths as well as GbEth code paths. >> * Updated references to the patches this series depends on. >> >> Paul Barker (7): >> net: ravb: Simplify poll & receive functions >=20 > The below 3 commits fix issues in the GbEth code, so should > be redone against net.git and posted separately from this series... >=20 >> net: ravb: Count packets instead of descriptors in RX path >> net: ravb: Always process TX descriptor ring >> net: ravb: Always update error counters I'll split out and re-submit these as bug fixes. "net: ravb: Count packets instead of descriptors in RX path" will require a bit of rework so it doesn't depend on the first patch of the series ("net: ravb: Simplify poll & receive functions") so you'll probably want to re-review when I send it. Then I'll re-send the rest as a non-RFC series. >=20 > [...] >=20 > MBR, Sergey Thanks for the review! Paul --------------kG6KqVt2nm7zk2pZF5LvPf2B Content-Type: application/pgp-keys; name="OpenPGP_0x27F4B3459F002257.asc" Content-Disposition: attachment; filename="OpenPGP_0x27F4B3459F002257.asc" Content-Description: OpenPGP public key Content-Transfer-Encoding: quoted-printable -----BEGIN PGP PUBLIC KEY BLOCK----- xsFNBGS4BNsBEADEc28TO+aryCgRIuhxWAviuJl+f2TcZ1JeeaMzRLgSXKuXzkiI g6JIVfNvThjwJaBmb7+/5+D7kDLJuutu9MFfOzTS0QOQWppwIPgbfktvMvwwsq3m 7e9Qb+S1LVeV0/ldZfuzgzAzHFDwmzryfIyt2JEbsBsGTq/QE+7hvLAe8R9xofIn z6/IndiiTYhNCNf06nFPR4Y5ZDZPGb9aw5Jisqh+OSxtc0BFHDSV8/35yWM/JLQ1 Ja8AOHw1kP9KO+iE9rHMt0+7lH3mN1GBabxH26EdgFfPShsi14qmziLOuUlGLuwO ApIYqvdtCs+zlMA8PsiJIMuxizZ6qCLur3r2b+/YXoJjuFDcax9M+Pr0D7rZX0Hk 6PW3dtvDQHfspwLY0FIlXbbtCfCqGLe47VaS7lvG0XeMlo3dUEsf707Q2h0+G1tm wyeuWSPEzZQq/KI7JIFlxr3N/3VCdGa9qVf/40QF0BXPfJdcwTEzmPlYetRgA11W bglw8DxWBv24a2gWeUkwBWFScR3QV4FAwVjmlCqrkw9dy/JtrFf4pwDoqSFUcofB 95u6qlz/PC+ho9uvUo5uIwJyz3J5BIgfkMAPYcHNZZ5QrpI3mdwf66im1TOKKTuf 3Sz/GKc14qAIQhxuUWrgAKTexBJYJmzDT0Mj4ISjlr9K6VXrQwTuj2zC4QARAQAB zStQYXVsIEJhcmtlciA8cGF1bC5iYXJrZXIuY3RAYnAucmVuZXNhcy5jb20+wsGU BBMBCgA+FiEE9KKf333+FIzPGaxOJ/SzRZ8AIlcFAmS4BNsCGwEFCQPCZwAFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQJ/SzRZ8AIlfxaQ/8CM36qjfad7eBfwja cI1LlH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0Dj9pUTMujW77Qh5IkUQLYZ2XQYnKAV2WI90B0R1p9 bXP+jqqkaNCrxKHV1tYOB6037CziGcZmiDneiTlM765MTLJLlHNqlXxDCzRwEazU y9dNzITjVT0qhc6th8/vqN9dqvQaAGa13u86Gbv4XPYdE+5MXPM/fTgkKaPBYcIV QMvLfoZxyaTk4nzNbBxwwEEHrvTcWDdWxGNtkWRZw0+U5JpXCOi9kBCtFrJ701UG UFs56zWndQUS/2xDyGk8GObGBSRLCwsXsKsF6hSX5aKXHyrAAxEUEscRaAmzd6O3 ZyZGVsEsOuGCLkekUMF/5dwOhEDXrY42VR/ZxdDTY99dznQkwTt4o7FOmkY=3D =3DsIIN -----END PGP PUBLIC KEY BLOCK----- --------------kG6KqVt2nm7zk2pZF5LvPf2B-- --------------YxdYTyxwde8Raj8xLdsTFczc-- --------------gdYqQiIth7xEUoa2x4MlHboa Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wnsEABYIACMWIQSiu8gv1Xr0fIw/aoLbaV4Vf/JGvQUCZcoGaQUDAAAAAAAKCRDbaV4Vf/JGvWQv AP99nq3e3tTCVG5AT5Ash4tBIc6HvHQJQ7jxGS0HWBZvswEA31lc75J5gyr6idRiOvRNRZKLqDKl R4f7AbNdK0fYVg0= =ha/M -----END PGP SIGNATURE----- --------------gdYqQiIth7xEUoa2x4MlHboa--