Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

virtio-crypto: enable retry for virtio-crypto-dev

Enable retry for virtio-crypto-dev, so that crypto-engine
can process cipher-requests parallelly.

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: lei he <helei.sig11@bytedance.com>
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Message-Id: <20220506131627.180784-6-pizhenwei@bytedance.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

authored by

lei he and committed by
Michael S. Tsirkin
4e0d352a a36bd0ad

+2 -1
+2 -1
drivers/crypto/virtio/virtio_crypto_core.c
··· 144 144 spin_lock_init(&vi->data_vq[i].lock); 145 145 vi->data_vq[i].vq = vqs[i]; 146 146 /* Initialize crypto engine */ 147 - vi->data_vq[i].engine = crypto_engine_alloc_init(dev, 1); 147 + vi->data_vq[i].engine = crypto_engine_alloc_init_and_set(dev, true, NULL, true, 148 + virtqueue_get_vring_size(vqs[i])); 148 149 if (!vi->data_vq[i].engine) { 149 150 ret = -ENOMEM; 150 151 goto err_engine;