Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3081075rwb; Thu, 29 Sep 2022 20:49:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4y20RVkA8MTn4JB1jjyRyKJ2AeZqoHEQmNdr7VrNQ0NdBbELQf8DVTqsOn5CsArjq+FnI3 X-Received: by 2002:a05:6402:1e96:b0:451:129e:1a2c with SMTP id f22-20020a0564021e9600b00451129e1a2cmr6308374edf.60.1664509793041; Thu, 29 Sep 2022 20:49:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664509793; cv=none; d=google.com; s=arc-20160816; b=LsvZKtpp41hfq0mIuUjg1RTYU5GqCeHAmScP9cbQhmpo9//deojIL/CifFAL32+5j5 IBSA+YM0zmASAY4qwUpxW3Td/v9C+kwNI+bEhLXZCtEFaXUmuVvyT9oydLpb2iu+fYUX 1M/OonH5zioeBsjecnEFtW3IQYCn/S7HGMXvtAKwBXY2YQ1YNxAWPS4HDYf3EXE6ztvl rVmPxFidmz8AkABeIWKZfbdmKowHkLtxCzmvEiGLPgfF/gTdJnZIg/q79dAeZYAUOfQ6 RsLitONsZKPzSKgwKZ54zA6XPQGtGjqL4LzcWZCdwNELFuVEvPcLKQ/iZn1m2KSE0SNd YSiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=sqIQrYAjXkGnRFzTOQu5Wcq/R6C+i4x+SEBucWIacfY=; b=YYM5AmkIjGedWSNqtWUEu2SDq6jJyO8LL0j9tXyfJW5k6IDLp5eIAx4eeb4u1dKCQC gOfZhfPYJ0BiG8nBOOjEEQBTmoKdBqrgDX2Js7qalx+oF+uyBVFC+Q+bBN3IoG5FPesA /KAzhdphDBu+zzloOnFxLD0CIpvgcNlglv48phIKOHgVshX8N8+p8g8A9MWBIl3bvPxT nkV5/IZqfVAt2YsWwJhycU5gYWNF1Mi/L5qAmypcJqBNaKNifz3C8DtH0Oy3QB71a5Vz bTB0lbSHMpWlayu1CckfYMD+nMoiGLHaLjx32gq4Og7HNH00xk0czdZlw2PfqMr8KMFp 9KDA== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2-20020a1709067c4200b007805f59299dsi898682ejp.291.2022.09.29.20.49.18; Thu, 29 Sep 2022 20:49:53 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230094AbiI3DsJ (ORCPT + 99 others); Thu, 29 Sep 2022 23:48:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229696AbiI3DsH (ORCPT ); Thu, 29 Sep 2022 23:48:07 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E69A1D73DF; Thu, 29 Sep 2022 20:48:06 -0700 (PDT) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Mdx030mVfzHtpR; Fri, 30 Sep 2022 11:43:15 +0800 (CST) Received: from kwepemm600005.china.huawei.com (7.193.23.191) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 11:48:04 +0800 Received: from [10.67.102.118] (10.67.102.118) by kwepemm600005.china.huawei.com (7.193.23.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 11:48:03 +0800 Subject: Re: [PATCH] crypto/hisilicon: Add null judgment to the callback interface To: Herbert Xu CC: , , References: <20220930024320.29922-1-liulongfang@huawei.com> From: liulongfang Message-ID: <717adf23-3080-5041-14ed-6ab5dcaddbf9@huawei.com> Date: Fri, 30 Sep 2022 11:48:02 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.118] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600005.china.huawei.com (7.193.23.191) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 2022/9/30 10:49, Herbert Xu wrote: > On Fri, Sep 30, 2022 at 10:43:20AM +0800, Longfang Liu wrote: >> The algorithm acceleration function interface provided by the >> current crypto subsystem is in asynchronous mode, but some users >> will call it in synchronous mode, thus not providing a callback >> interface for the "base.complete" of the request. > > Please give more details. Who is calling the callback functions > in synchronous mode? > Even if the task is sent in synchronous mode, when using the hardware driver, the hardware still informs the driver software through an interrupt after completing the task, and the workqueue in the driver software will call this callback function. And I found that the device drivers of other manufacturers under the crypto subsystem are also in this asynchronous mode, and this problem is also encountered when using the synchronous mode. > Thanks, > Thanks, Longfang.