Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7400986rwl; Mon, 9 Jan 2023 23:45:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXtHRo8OfCTKvfpCmhSJDj8V3YrCC+duHa3y84S165ogZkmW2/44LvH/wAJD6XqDiht2NFBD X-Received: by 2002:a05:6a20:1aa4:b0:b6:1b25:d294 with SMTP id ci36-20020a056a201aa400b000b61b25d294mr621097pzb.53.1673336746164; Mon, 09 Jan 2023 23:45:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673336746; cv=none; d=google.com; s=arc-20160816; b=rBA4JDnE13930e3DbPtX09aqpyiJIW+Xw11Its79+MHNcBaOsBLUdvjG+0VGoCv/NS 9Z+0stbVAyMLRKG5udAxlEYX5tBtUUmdQ8NJHbeyCE+KGSiDNQ6uPf3vVH4bOTyXC2eI ElnZu4zqIHosYzjJQ7uQbd4IyPiCPl/rr9JkwUpqGAtmroMaCCEZzLtE2DB1yxr/KKL9 1J7fS3t5X+ykCQyo7hUFKMSWAzlVYiOGLbuN2E+mtkp6oh874g/iBOm985lopfo8fASK l5H4vH0lHIEZdlZGjQ1MwMp+4ag8nfv4KxhqZSMABMPj7Ng9GcpNmHeB74p/a1v5xNCT 0Chw== 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; bh=5bBTOadDPrDlHrw1edtrUFeSOaZKcSgN0DRNEOsE4/w=; b=rkaFBdPc/lCgKPlW9CaWhJ7v6SAwz+Orz7XrYfzRh0Yq/HF6P+SL8iuRXfLZWZlJt5 1WNYCM8UvFqN86U1Bm2hZJB1MielnIISkAOSdv6Rp0L1ixozTvGqtl5mXh1qtaHBQ/IX FaQNfy+llVJvqA5IMa+SAsdyK4zPWH6wTDiI1J3aI+MHPfI/bWTOxQ+MxIxtUnOecezT As1Jxhl8h4ILswGBHFF9XzrwgT5TVihPe47TycMQOVzHusFl5I49Id2XBi+qmy3DdSLf YnHky47kbF9sGRYXjJM04iMrO1M09EZ/6HlSL1U/zm4Tboub2YjpOWzrrD1IijU4KGF6 zltg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t15-20020a17090a1c8f00b002265fc6cfc9si14710169pjt.77.2023.01.09.23.45.28; Mon, 09 Jan 2023 23:45:46 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229707AbjAJHom (ORCPT + 99 others); Tue, 10 Jan 2023 02:44:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229889AbjAJHol (ORCPT ); Tue, 10 Jan 2023 02:44:41 -0500 Received: from formenos.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1A4817595 for ; Mon, 9 Jan 2023 23:44:40 -0800 (PST) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1pF9JG-00FwqT-7o; Tue, 10 Jan 2023 15:44:39 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Tue, 10 Jan 2023 15:44:38 +0800 Date: Tue, 10 Jan 2023 15:44:38 +0800 From: Herbert Xu To: Markus Stockhausen Cc: linux-crypto@vger.kernel.org Subject: Re: [PATCH v3 3/6] crypto/realtek: hash algorithms Message-ID: References: <0d119d3f54eb5decec58b2afcb2119902d8373db.camel@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0d119d3f54eb5decec58b2afcb2119902d8373db.camel@gmx.de> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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, Jan 06, 2023 at 05:09:25PM +0100, Markus Stockhausen wrote: > > I thought that using wait_event() inside the above function should be > sufficient to handle that. Any good example of how to achieve that type > of completion? I think most other drivers in drivers/crypto are async. Essentially, you return -EINPROGRESS in the update/final functions if the request was successfully queued to the hardware, and once it completes you invoke the completion function. If you don't have your own queueing mechanism, you should use the crypto_engine API to queue the requests before they are processed. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt