Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3286029iob; Sat, 7 May 2022 01:03:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyt09RfGBqb6ItaPJr53R1jfVMtpiGf4CvBlV0sUQmX0lIy8Vx9easvx3yZTcPv2XPj54y X-Received: by 2002:a17:906:99c2:b0:6f4:a99c:8dfc with SMTP id s2-20020a17090699c200b006f4a99c8dfcmr6903765ejn.386.1651910603461; Sat, 07 May 2022 01:03:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651910603; cv=none; d=google.com; s=arc-20160816; b=TItPp9cJRKWN2j1nhyQ4O4F9/tvK2wPebEWYhuLQuoA8sHVW2n3VkwaELGoKw93nMo 5NnkhfW/W663drDuCoe5vB/EyBQ8u1+/961B8bKdcOsdDxC0j9p+xmAXTw/5p//RLsmS CK+aGSCF0nzA3jUz3B6sNufH0Fe0twtABLfndVAtgngZsPtxBf7RTSlMAespcesT9Fyd 0SvEAkQVx4xB8hWwNmhP9GzX54qsmbemuvMnPw74OTYCoyLAIOrHtjf0sDZ4XDoDT/95 k5kvVslbUYdGPXs9BT+6xcxY9MtTAar64BcyKHvHngqzOvhI16LjL5QZVNPi7fQKhHzc azeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=I1Nym3lqyXzVL4EWlrD5zH2hvyeghZaNqesuTUN63Gc=; b=bWgpwG9ouxZgbRvtAtOKQhuQ1IWLpkbtqtq6BYIBwzJzIbNeNeEukC4NbiK2aR+UFK guT65XXt/m0C6JE/LRap4YCZ+FAJACSvRQVFcHdKlxXuDzwlwnvxCqhD0o7STxb8BsBQ wtwFxnrAM/PS8+ZH3pE0xqOJF+1CO0KOy/qFjeZ03wD0a+Sm3A1QBBaS4XOMwlsFr1L0 XxH/iZGZ0IbjDDP0TsIqTjN6O9emElsI66jLjgd8siw/IUH1w8FKXeuLMSIz/GKyYG5e g6zcxShikyctAblKwoE8CsFuf+PpCWctVyC2/5oX0ekh1KKUnBvYU73wCUTdOdcuCGgp ipng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 v18-20020a170906181200b006f4fc3b8b6esi6106282eje.21.2022.05.07.01.02.57; Sat, 07 May 2022 01:03:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S1350840AbiEFJi0 convert rfc822-to-8bit (ORCPT + 99 others); Fri, 6 May 2022 05:38:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238563AbiEFJiX (ORCPT ); Fri, 6 May 2022 05:38:23 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CFCB106; Fri, 6 May 2022 02:34:41 -0700 (PDT) Received: from kwepemi100012.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Kvlkl6FPMzhYhf; Fri, 6 May 2022 17:34:07 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by kwepemi100012.china.huawei.com (7.221.188.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 6 May 2022 17:34:39 +0800 Received: from dggpemm500006.china.huawei.com ([7.185.36.236]) by dggpemm500006.china.huawei.com ([7.185.36.236]) with mapi id 15.01.2375.024; Fri, 6 May 2022 17:34:39 +0800 From: "Gonglei (Arei)" To: zhenwei pi , "mst@redhat.com" CC: "jasowang@redhat.com" , "herbert@gondor.apana.org.au" , "linux-kernel@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , "linux-crypto@vger.kernel.org" , "helei.sig11@bytedance.com" , "davem@davemloft.net" Subject: RE: [PATCH v5 5/5] virtio-crypto: enable retry for virtio-crypto-dev Thread-Topic: [PATCH v5 5/5] virtio-crypto: enable retry for virtio-crypto-dev Thread-Index: AQHYYGfJIkLldEFis0GWr3Sle9+GwK0Rltzw Date: Fri, 6 May 2022 09:34:39 +0000 Message-ID: References: <20220505092408.53692-1-pizhenwei@bytedance.com> <20220505092408.53692-6-pizhenwei@bytedance.com> In-Reply-To: <20220505092408.53692-6-pizhenwei@bytedance.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.174.149.11] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org > -----Original Message----- > From: zhenwei pi [mailto:pizhenwei@bytedance.com] > Sent: Thursday, May 5, 2022 5:24 PM > To: Gonglei (Arei) ; mst@redhat.com > Cc: jasowang@redhat.com; herbert@gondor.apana.org.au; > linux-kernel@vger.kernel.org; virtualization@lists.linux-foundation.org; > linux-crypto@vger.kernel.org; helei.sig11@bytedance.com; > pizhenwei@bytedance.com; davem@davemloft.net > Subject: [PATCH v5 5/5] virtio-crypto: enable retry for virtio-crypto-dev > > From: lei he > > Enable retry for virtio-crypto-dev, so that crypto-engine can process > cipher-requests parallelly. > > Cc: Michael S. Tsirkin > Cc: Jason Wang > Cc: Gonglei > Signed-off-by: lei he > Signed-off-by: zhenwei pi > --- > drivers/crypto/virtio/virtio_crypto_core.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/crypto/virtio/virtio_crypto_core.c > b/drivers/crypto/virtio/virtio_crypto_core.c > index 60490ffa3df1..f67e0d4c1b0c 100644 > --- a/drivers/crypto/virtio/virtio_crypto_core.c > +++ b/drivers/crypto/virtio/virtio_crypto_core.c > @@ -144,7 +144,8 @@ static int virtcrypto_find_vqs(struct virtio_crypto *vi) > spin_lock_init(&vi->data_vq[i].lock); > vi->data_vq[i].vq = vqs[i]; > /* Initialize crypto engine */ > - vi->data_vq[i].engine = crypto_engine_alloc_init(dev, 1); > + vi->data_vq[i].engine = crypto_engine_alloc_init_and_set(dev, true, > NULL, 1, > + virtqueue_get_vring_size(vqs[i])); Here the '1' can be 'true' too. Sure, you can add Reviewed-by: Gonglei Regards, -Gonglei > if (!vi->data_vq[i].engine) { > ret = -ENOMEM; > goto err_engine; > -- > 2.20.1