Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1357743rdg; Fri, 11 Aug 2023 20:36:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEIootTSiAXpih/t7Uy6TKL3fYWZXzCqVdbi1VJZN2u2yQ0Qv5UXUI0prrm6WnSEIj/Wyp3 X-Received: by 2002:a17:906:5346:b0:99c:85af:7aa6 with SMTP id j6-20020a170906534600b0099c85af7aa6mr3185124ejo.28.1691811410213; Fri, 11 Aug 2023 20:36:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691811410; cv=none; d=google.com; s=arc-20160816; b=ioI+4LpC5z+xhToa7mhQNavJifZ3zlLQn03BxMWDZIaa3cEuKepteq2fiCo4wSJrNS exc34bNwZQ3/2jaQFRfwGmCNBOGFAz31LavZsnKX96pP1jIzJyz2c9VKH83hGvXxMxwE d4v+qqPziNDxRlFTxGlmu6qs10U5yVvzqtOCX9gyYDGZuZdQBC7eW8Y3mB39RAAPfor+ 2dN57htnGPBGx4SVnD13FzQOfTF02VJiJ5M3du4/Si1Gv817ERgmlDPr+j2ct776LTV+ Q+nlGArxCc7ewtObHBSAWGj2tJ2C7FgROPxak9kRpEg/4koA9T3Yv0VxRKTQdWIbPs2l o2Yg== 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=T4hOmGcU+172XbWPtUB8i7HYAcBpZ0eAOVQh9mUHkOw=; fh=QmCn4HnGA+H3d/OXlbWy1+w+ikPe5fSyYiG0ncSDf+s=; b=O9sooGq3yQkTsMWyj8i1HPLPqnIg7h/H/YpWxuvt03Y5v4ta1swAidVLw+0/5Sww4N dqAP46UZY/V0jmgzE/pYBkPUYD8FstpmTVFhjpP0jDGIxGhSbrZ5o5CR1ShKLJCJdmvm M9u0t4CIaMsO65dQb5Iu+TxL6tOsAKBxDRUNVzhYDn/0RH7F7ZGYm3cYVkpi64A8HXVe AWdveH29qhe33vHUOzeLY0XeckAaw9lKbo6JQnL/WaiJKlGxatIvhPiFO1WYoAfpCnni UfArawbn3cmBdiWFs1+5pXUfx83q7+85LlSMRV3g93DckZyunZUFwEhYLm+nBsGoBiyT XJSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PCxyEaxo; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j16-20020a1709064b5000b0099845f6579csi4220224ejv.631.2023.08.11.20.36.15; Fri, 11 Aug 2023 20:36:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PCxyEaxo; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233270AbjHLDBU (ORCPT + 99 others); Fri, 11 Aug 2023 23:01:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229808AbjHLDBT (ORCPT ); Fri, 11 Aug 2023 23:01:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63D7530E8; Fri, 11 Aug 2023 20:01:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0372F63C60; Sat, 12 Aug 2023 03:01:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9AB6C433C8; Sat, 12 Aug 2023 03:01:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691809278; bh=l/yGOkqsa8kjqG7Q1FQDe6y3BvLBuVJGICeXb/Wg5U4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PCxyEaxofwKOYu++aRE8JA4T/q7hFz1Tm2cqdaSq9C7IwL4TLoD0hSX5PzqUZAmwg AQ0Orhh4RIGvEvJ6/RFNlRgS7xqfH8+sGkTzSsaKvnFkoXkwhdIXZ0b8PYtK/wPGqx EsIB3TgiTWUiUH5BxyBCLAxc3x5BX23OdMPz/M/0w4M7PwEbvYQ1JzmcMWxjAQ3aGG rlT/VwdIFSJ2VL1x5XgG6V5SuIk/Dm0DK4s4NXDqgdJvsXZdGhcAHR/SDMhVphAJn2 eBy1ORPaoHqfZ+1QGnWQaNa6MHgcMjZpSJMMBRqi/XvMCd2So6840O0lwUh0t58MBk 7FjJZ/kVIKA/w== Date: Fri, 11 Aug 2023 20:01:16 -0700 From: Eric Biggers To: Kamlesh Gurudasani Cc: Herbert Xu , "David S. Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Catalin Marinas , Will Deacon , Maxime Coquelin , Alexandre Torgue , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [PATCH v2 0/6] Add support for Texas Instruments MCRC64 engine Message-ID: <20230812030116.GF971@sol.localdomain> References: <20230719-mcrc-upstream-v2-0-4152b987e4c2@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230719-mcrc-upstream-v2-0-4152b987e4c2@ti.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Aug 11, 2023 at 12:58:47AM +0530, Kamlesh Gurudasani wrote: > Add support for MCRC64 engine to calculate 64-bit CRC in Full-CPU mode > > MCRC64 engine calculates 64-bit cyclic redundancy checks (CRC) > according to the ISO 3309 standard. > > The ISO 3309 64-bit CRC model parameters are as follows: > Generator Polynomial: x^64 + x^4 + x^3 + x + 1 > Polynomial Value: 0x000000000000001B > Initial value: 0x0000000000000000 > Reflected Input: False > Reflected Output: False > Xor Final: 0x0000000000000000 > > Tested with > CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set > CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y > > and tcrypt, > sudo modprobe tcrypt mode=329 sec=1 > > User space application implemented using algif_hash, > https://gist.github.com/ti-kamlesh/73abfcc1a33318bb3b199d36b6209e59 > > Signed-off-by: Kamlesh Gurudasani I do not see any in-kernel user of this CRC variant being introduced, which leaves algif_hash as the only use case. Can you elaborate on the benefit this brings to your application? Yes, it allows you to use your hardware CRC engine. But, that comes with all the overhead from the syscalls, algif_hash, and the driver. How does performance compare to a properly optimized software CRC implementation on your platform, i.e. an implementation using carryless multiplication instructions (e.g. ARMv8 CE) if available on your platform, otherwise an implementation using the slice-by-8 or slice-by-16 method? - Eric