> -----Original Message----- > From: zhenwei pi [mailto:pizhenwei@xxxxxxxxxxxxx] > Sent: Thursday, May 5, 2022 5:24 PM > To: Gonglei (Arei) <arei.gonglei@xxxxxxxxxx>; mst@xxxxxxxxxx > Cc: jasowang@xxxxxxxxxx; herbert@xxxxxxxxxxxxxxxxxxx; > linux-kernel@xxxxxxxxxxxxxxx; virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx; > linux-crypto@xxxxxxxxxxxxxxx; helei.sig11@xxxxxxxxxxxxx; > pizhenwei@xxxxxxxxxxxxx; davem@xxxxxxxxxxxxx > Subject: [PATCH v5 5/5] virtio-crypto: enable retry for virtio-crypto-dev > > From: lei he <helei.sig11@xxxxxxxxxxxxx> > > Enable retry for virtio-crypto-dev, so that crypto-engine can process > cipher-requests parallelly. > > Cc: Michael S. Tsirkin <mst@xxxxxxxxxx> > Cc: Jason Wang <jasowang@xxxxxxxxxx> > Cc: Gonglei <arei.gonglei@xxxxxxxxxx> > Signed-off-by: lei he <helei.sig11@xxxxxxxxxxxxx> > Signed-off-by: zhenwei pi <pizhenwei@xxxxxxxxxxxxx> > --- > 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 <arei.gonglei@xxxxxxxxxx> Regards, -Gonglei > if (!vi->data_vq[i].engine) { > ret = -ENOMEM; > goto err_engine; > -- > 2.20.1 _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization