Commit 4e0d352a authored by lei he's avatar lei he Committed by Michael S. Tsirkin

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: default avatarGonglei <arei.gonglei@huawei.com>
Signed-off-by: default avatarlei he <helei.sig11@bytedance.com>
Signed-off-by: default avatarzhenwei pi <pizhenwei@bytedance.com>
Message-Id: <20220506131627.180784-6-pizhenwei@bytedance.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent a36bd0ad
...@@ -144,7 +144,8 @@ static int virtcrypto_find_vqs(struct virtio_crypto *vi) ...@@ -144,7 +144,8 @@ static int virtcrypto_find_vqs(struct virtio_crypto *vi)
spin_lock_init(&vi->data_vq[i].lock); spin_lock_init(&vi->data_vq[i].lock);
vi->data_vq[i].vq = vqs[i]; vi->data_vq[i].vq = vqs[i];
/* Initialize crypto engine */ /* 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, true,
virtqueue_get_vring_size(vqs[i]));
if (!vi->data_vq[i].engine) { if (!vi->data_vq[i].engine) {
ret = -ENOMEM; ret = -ENOMEM;
goto err_engine; goto err_engine;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment