Thread (3 messages) flat view 3 messages, 2 authors, 2016-12-15

RE: [Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver

From: "Gonglei (Arei)" <arei.gonglei@huawei.com>
Date: 2016-12-15 00:48:37
Also in: linux-crypto, lkml, qemu-devel


On 12/14/2016 12:50 PM, Gonglei wrote:
quoted
diff --git a/drivers/crypto/virtio/virtio_crypto_core.c
b/drivers/crypto/virtio/virtio_crypto_core.c
quoted
new file mode 100644
index 0000000..c0854a1
--- /dev/null
+++ b/drivers/crypto/virtio/virtio_crypto_core.c
@@ -0,0 +1,474 @@
[..]
quoted
+
+static void virtcrypto_dataq_callback(struct virtqueue *vq)
+{
+	struct virtio_crypto *vcrypto = vq->vdev->priv;
+	struct virtio_crypto_request *vc_req;
+	unsigned long flags;
+	unsigned int len;
+	struct ablkcipher_request *ablk_req;
+	int error;
+
+	spin_lock_irqsave(&vcrypto->lock, flags);
Would it make sense to use a per virtqueue lock
like in virtio_blk for example instead of locking on the whole
device? OK, it seems you use only one dataqueue, so it
may not be that relevant.
Currently yes, both the backend device (cryptodev-backend-builtin)
and the frontend driver use one dataqueue.

Regards,
-Gonglei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help