Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp1059766rdb; Wed, 1 Nov 2023 10:07:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEQ1ktFWbeUdeiyN17u/jKrqxlaZISpKSO6F+Bklykg1X3ZU9oqwwux5sNDESpMrTVZMegY X-Received: by 2002:a05:6a20:7a96:b0:15c:b7ba:1671 with SMTP id u22-20020a056a207a9600b0015cb7ba1671mr6017982pzh.2.1698858430323; Wed, 01 Nov 2023 10:07:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698858430; cv=none; d=google.com; s=arc-20160816; b=s6bin7i0ycixZhxvOj7I9ktBEhbTbK3f/Ydz0KfPSyiZwx57zRC6+apmmf1NMBv+R5 sbOhUHs9RlMfyN0HZ6dROfOSWae7YORJ8PjZQDDSVX1BEk9I0W3LfJCPig+AaGd61INF dLCVpPLd4j6Jmuz31XhEliQm7YSt6QRDjHDfPKjtA6avN5LH0h9YquJsrzAm1a2KeToT URIU73gQb1853OWqa0YWmh/u0QDiEzobK04MJl85Eaq8qmdyzyWDtPeRcD7FHajeSRGe mT8jBChQpOybNI4eT9uJ/g3R53WEb66UlDRvuw8o0TZ4D7aiu02OE54qVtYAXzlbCfKH jXAg== 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=ACtbDGuD6MnDLtRfrY8r3GOV1M4ngbjpcwXbhvL0euE=; fh=8Qd678isoBUhOpi5h5UW1OneWPqkXtbN5IwTDPgwPEY=; b=Pi9gPCJBLuPcQl6nqR55CVINaA0kSLK5fyLSk4s5ZWwEs9OtyAZn/AlyuURNcG+ct2 ff45JmLWqxda5lM+69WLk7Ig81T+uWYIE70Baf4Q0CHOoXpkn0TbVzGg555Xchfh1gTm nogmaYCdRmFJRxRXg1KGFwCUFgLMWsTY6WSo4nRwftaMKcHFyajXlix3ygDizcLS95E7 sN/y5dxD4atGUYDC4IhfxUYEFPrB+IejLAP7IlTwWebWjeaFNMEXu076okFWZAJce+Ug 3nPCJGFDEnqw7bWk3/W+OeR+waO8fdJOCoohDj4ZmCPLgcequPSQ40UUY71Ninwp0XkB yPqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=P6RS5VG3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id y12-20020a056a00180c00b0069335e0c824si2100295pfa.204.2023.11.01.10.06.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 10:07:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=P6RS5VG3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 9D0DD8074CD9; Wed, 1 Nov 2023 10:06:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231974AbjKARGe (ORCPT + 99 others); Wed, 1 Nov 2023 13:06:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231233AbjKARGd (ORCPT ); Wed, 1 Nov 2023 13:06:33 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A723D110 for ; Wed, 1 Nov 2023 10:06:29 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1cc3388621cso9568545ad.1 for ; Wed, 01 Nov 2023 10:06:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1698858389; x=1699463189; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ACtbDGuD6MnDLtRfrY8r3GOV1M4ngbjpcwXbhvL0euE=; b=P6RS5VG3dAppFpjc9hkAVqsv5Vjq9QigYbFnG5QcKvnEdihFo+HN4v6zbOjOF2zs/W oMKfqHMhO7CRDihmTS53TkMazuNTW8muMF5cnrnNUvQtJxObv5hO1qECfFlK0pg67Oxn D/qydX6aWGinxjJoRWqeVf8CDV6dQcMUu5wjzv+3/OjNLhBCBMBnGk3DAVupzySbgElC d5nz9DztbUCpt6mxCtlJfJ3bPmQ8fycHxGuu4Ih8q2eWiolXuJN1A9naXdDB442pmY0Z oeFjDC9Qn9WmC739SJSIGUzFZVpjwkZjPZJveeukJt3TLdECfSMU5GETODzFbCg5h7GQ C6hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698858389; x=1699463189; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ACtbDGuD6MnDLtRfrY8r3GOV1M4ngbjpcwXbhvL0euE=; b=D48IhIG2wklGMM5B/1+hNCYiAGd8cfOnosOpd9Z5w9y5dkifbWSHp1Rxu6afro7V8d JO3qKq8QOEkHrbWstO9oBI/QlrdBgU9MLvwYGbokyEo+pQGelEsMTeFkGiZCUmfPNpnz kYSnsHRYOhEdhHiGh3S+GZsmaFDjVilMIGT/12zwxcQa1o4vWVfrPPCZ+ZlLIhBjWHaI Z5IV4lEO7ZifngjQlH5rUZOJTUHCuCxq4dzcB+KOrwp2PybNEuXlCCy//t1tFtMffDKm KsAttPeet6fbfB8PxIadoOP2m74Ax51nj9lnjuNKbvX/VKmg4EU/AR4cDg1pObqOuku/ ak3w== X-Gm-Message-State: AOJu0YxGoPPU8FnnLwLSJi2bqbbf+T+Czy57FAsNKcNJXQSbgjpKldoY 1KLakN7uZDPjDHpI57JCUAhYFQ== X-Received: by 2002:a17:902:d488:b0:1cc:5f5a:5d3 with SMTP id c8-20020a170902d48800b001cc5f5a05d3mr9031339plg.22.1698858389079; Wed, 01 Nov 2023 10:06:29 -0700 (PDT) Received: from ghost ([12.44.203.122]) by smtp.gmail.com with ESMTPSA id jh19-20020a170903329300b001c61df93afdsm1580553plb.59.2023.11.01.10.06.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 10:06:28 -0700 (PDT) Date: Wed, 1 Nov 2023 10:06:26 -0700 From: Charlie Jenkins To: Conor Dooley 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: References: <20231031-optimize_checksum-v9-0-ea018e69b229@rivosinc.com> <20231101-palace-tightly-97a1d35a4597@spud> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231101-palace-tightly-97a1d35a4597@spud> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,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 fry.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 (fry.vger.email [0.0.0.0]); Wed, 01 Nov 2023 10:06:45 -0700 (PDT) On Wed, Nov 01, 2023 at 11:50:46AM +0000, Conor Dooley wrote: > 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. > > > > This patch takes heavy use of the Zbb extension using alternatives > > patching. > > > > To test this patch, enable the configs for KUNIT, then CHECKSUM_KUNIT > > and RISCV_CHECKSUM_KUNIT. > > > > 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. > > > > 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. > > > > Relies on https://lore.kernel.org/lkml/20230920193801.3035093-1-evan@rivosinc.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_checksum-v9-3-ea018e69b229@rivosinc.com/ > > Cheers, > Conor. You did, and I fixed the build issues. This is another instance of how Patchwork reports the results of the previous build before the new build completes. Patchwork was very far behind so it took around 15 hours for the result to be ready. There are some miscellaneous warnings in random drivers that I don't think can be attributed to this patch. - Charlie