Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp846376rdb; Wed, 1 Nov 2023 04:51:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHiBZpTrMaZTXJspHXhEGaoMMG5A+WJjiRgYAVU3jsRo8abFWix/xDwnVuE/lFXKn+7Vy9l X-Received: by 2002:a17:902:e30a:b0:1cc:644a:211b with SMTP id q10-20020a170902e30a00b001cc644a211bmr4303253plc.47.1698839470264; Wed, 01 Nov 2023 04:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698839470; cv=none; d=google.com; s=arc-20160816; b=1COxG5IaX99XjEVpKaZ2YolSFMRPwshMgm+E/dDoKNoneIUjyHAFfOD4Oualy1iFgX jR9Bu+5nezqlGCzIlklMwMxiplICAINd1AQxwf3fJkaOhOuFyAXnnx2vdNe6yKhYHBz2 F4pSm2XAZk0OL6DW1kuHlF8qk6QEhBX30NGucLgo8Dr6uV8tvQAkRX4KgrqfOkpQGf8H Z5JSCcIII1VaGfiGpDr0oHGRR8npfooNqyQ6fVnapfUGsDHVHpSSgy6nkIJSvN8wbHSK F5wyCCZaN+iVcrWmwD6gOSBp7VD5ToCUxEkendWeK82O88TrZIyTCguV3DTZ7Kw1xxjn YrhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mF6eg4XvSECsF2HMgNiQoGzvU7I5nf27Gh38oBPoW8w=; fh=SXoStSyggZ9DBKpj49sloVPC/nNyc+rPyeEfCZ2N30U=; b=RBproJWxIWQYzfdNmcQAavbibD9ZZfCywThWkOwxH0OBcW9VtH92N8lSQbGuRDk/ho 3+8eRxUC8YzQqe6Lgp7wrc3hwPGPU8pelAWSrqg3R+R265BoLMB/QFgKDs/JrOVGcifP yCuT74FCw3Zp/RqZjTCZMBTg8Fy3OrdV2zFhlTwHnWC9IiL1DAhxhgoCLy2YFSDruwrt uYAbOtFtCZ7QYj2666w7O+aMSUwIFFWYxFv7HjlBH4taOKa4BJ+pw3KSRG6oVUqsJEyw ZymPugDnZCLZAg2Qqpj9GeE3vjS1nHoa2VSIh0slD+2Jmo9Sl+G73spFtETTEvOBFIOV TlHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=misf2IeN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id j3-20020a170903028300b001bda57935fasi2958913plr.64.2023.11.01.04.51.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 04:51:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=misf2IeN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 8B77880401D5; Wed, 1 Nov 2023 04:51:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235308AbjKALu5 (ORCPT + 99 others); Wed, 1 Nov 2023 07:50:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231538AbjKALuz (ORCPT ); Wed, 1 Nov 2023 07:50:55 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA912109; Wed, 1 Nov 2023 04:50:51 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ABA00C433C9; Wed, 1 Nov 2023 11:50:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698839451; bh=mF6eg4XvSECsF2HMgNiQoGzvU7I5nf27Gh38oBPoW8w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=misf2IeNRgfcUPjvk9oQ48jbkYilldGVOKEo78NWgtyyiJKFDZX40Xwemwf/fBhsx s2POZN2NGNfhrFnuf0liu77A/wyhqOUqQdwRs7/TeE998W8lfLrk2mb1idYIWZLR5V bFqIamEMC9t+Ys+bamXQFdX03YBbtI4lXscLwfqaEJORAYa2wl4RgMmFVlnP+I3xeu sZETzyTkmDMKSOCO7S4JCz205KrJaOvxSlXLeZKvWk71LUVs9jisMPiEARQjfKRwfV kDOeRUW/Dd5lHMQrLEIdMdhrouhvMT+xg2ywZQb3YFddMiSdMYHZGcjQLLmMhoei7Y RaSvd6gry7SCg== Date: Wed, 1 Nov 2023 11:50:46 +0000 From: Conor Dooley To: Charlie Jenkins Cc: Palmer Dabbelt , Samuel Holland , David Laight , Xiao Wang , Evan Green , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Paul Walmsley , Albert Ou , Arnd Bergmann , Conor Dooley Subject: Re: [PATCH v9 0/5] riscv: Add fine-tuned checksum functions Message-ID: <20231101-palace-tightly-97a1d35a4597@spud> References: <20231031-optimize_checksum-v9-0-ea018e69b229@rivosinc.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LjqsyqiDGC45356u" Content-Disposition: inline In-Reply-To: <20231031-optimize_checksum-v9-0-ea018e69b229@rivosinc.com> X-Spam-Status: No, score=-1.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 01 Nov 2023 04:51:07 -0700 (PDT) --LjqsyqiDGC45356u Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 31, 2023 at 05:18:50PM -0700, Charlie Jenkins wrote: > Each architecture generally implements fine-tuned checksum functions to > leverage the instruction set. This patch adds the main checksum > functions that are used in networking. >=20 > This patch takes heavy use of the Zbb extension using alternatives > patching. >=20 > To test this patch, enable the configs for KUNIT, then CHECKSUM_KUNIT > and RISCV_CHECKSUM_KUNIT. >=20 > I have attempted to make these functions as optimal as possible, but I > have not ran anything on actual riscv hardware. My performance testing > has been limited to inspecting the assembly, running the algorithms on > x86 hardware, and running in QEMU. >=20 > ip_fast_csum is a relatively small function so even though it is > possible to read 64 bits at a time on compatible hardware, the > bottleneck becomes the clean up and setup code so loading 32 bits at a > time is actually faster. >=20 > Relies on https://lore.kernel.org/lkml/20230920193801.3035093-1-evan@rivo= sinc.com/ I coulda sworn I reported build issues against the v8 of this series that are still present in this v9. For example: https://patchwork.kernel.org/project/linux-riscv/patch/20231031-optimize_ch= ecksum-v9-3-ea018e69b229@rivosinc.com/ Cheers, Conor. --LjqsyqiDGC45356u Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZUI7lgAKCRB4tDGHoIJi 0h2sAP0RKjRG5Rpub/HvLIazZUE6vW1OEyWKng47PNLxPT1sUgD/Xz1kJ0si+e+m myJ1M13eciVOu5bFSEGmDXc/0JMsxgY= =1Fkh -----END PGP SIGNATURE----- --LjqsyqiDGC45356u--