Displaying 20 results from an estimated 45 matches for "ablk_req".
2016 Dec 14
2
[Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver
...t; @@ -0,0 +1,474 @@
[..]
> +
> +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.
> + do {
> + vir...
2016 Dec 14
2
[Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver
...t; @@ -0,0 +1,474 @@
[..]
> +
> +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.
> + do {
> + vir...
2019 Oct 14
0
[PATCH 03/25] crypto: virtio - switch to skcipher API
...struct skcipher_request *req,
int err);
static void virtio_crypto_dataq_sym_callback
@@ -59,7 +60,7 @@ static void virtio_crypto_dataq_sym_callback
{
struct virtio_crypto_sym_request *vc_sym_req =
container_of(vc_req, struct virtio_crypto_sym_request, base);
- struct ablkcipher_request *ablk_req;
+ struct skcipher_request *ablk_req;
int error;
/* Finish the encrypt or decrypt process */
@@ -79,8 +80,8 @@ static void virtio_crypto_dataq_sym_callback
error = -EIO;
break;
}
- ablk_req = vc_sym_req->ablkcipher_req;
- virtio_crypto_ablkcipher_finalize_req(vc_sym_req,
+ ab...
2019 Oct 24
0
[PATCH v2 03/27] crypto: virtio - switch to skcipher API
...struct skcipher_request *req,
int err);
static void virtio_crypto_dataq_sym_callback
@@ -59,7 +60,7 @@ static void virtio_crypto_dataq_sym_callback
{
struct virtio_crypto_sym_request *vc_sym_req =
container_of(vc_req, struct virtio_crypto_sym_request, base);
- struct ablkcipher_request *ablk_req;
+ struct skcipher_request *ablk_req;
int error;
/* Finish the encrypt or decrypt process */
@@ -79,8 +80,8 @@ static void virtio_crypto_dataq_sym_callback
error = -EIO;
break;
}
- ablk_req = vc_sym_req->ablkcipher_req;
- virtio_crypto_ablkcipher_finalize_req(vc_sym_req,
+ ab...
2016 Dec 27
1
[PATCH] virtio-crypto: support crypto engine framework
...rtio/virtio_crypto_core.c
@@ -25,7 +25,7 @@
#include "virtio_crypto_common.h"
-static void
+void
virtcrypto_clear_request(struct virtio_crypto_request *vc_req)
{
if (vc_req) {
@@ -66,12 +66,12 @@ static void virtcrypto_dataq_callback(struct virtqueue *vq)
break;
}
ablk_req = vc_req->ablkcipher_req;
- virtcrypto_clear_request(vc_req);
spin_unlock_irqrestore(
&vcrypto->data_vq[qid].lock, flags);
/* Finish the encrypt or decrypt process */
- ablk_req->base.complete(&ablk_req->base, error);
+ virtio_crypto_ablkcipher_finaliz...
2016 Dec 27
1
[PATCH] virtio-crypto: support crypto engine framework
...rtio/virtio_crypto_core.c
@@ -25,7 +25,7 @@
#include "virtio_crypto_common.h"
-static void
+void
virtcrypto_clear_request(struct virtio_crypto_request *vc_req)
{
if (vc_req) {
@@ -66,12 +66,12 @@ static void virtcrypto_dataq_callback(struct virtqueue *vq)
break;
}
ablk_req = vc_req->ablkcipher_req;
- virtcrypto_clear_request(vc_req);
spin_unlock_irqrestore(
&vcrypto->data_vq[qid].lock, flags);
/* Finish the encrypt or decrypt process */
- ablk_req->base.complete(&ablk_req->base, error);
+ virtio_crypto_ablkcipher_finaliz...
2016 Dec 15
2
[Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver
...o_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 on...
2016 Dec 15
2
[Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver
...o_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 on...
2016 Dec 15
1
[Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver
...gt; +{
> > < > > + 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...
2016 Dec 15
1
[Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver
...gt; +{
> > < > > + 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...
2016 Dec 14
2
[PATCH v7 0/1] virtio-crypto: add Linux driver
v7:
- fix "BUG: smp_processor_id() in preemptible [00000000] code" reported by Halil,
using get_cpu/put_cpu instead of calling smp_processor_id() directly.
- fix a possible spinlock recursion in virtcrypto_dataq_callback(), we should
release the spinlock before invoking the callback.
- rebase on the latest kernel master tree.
v6:
- add patch 1/2 to make sparc architecture
2016 Dec 14
2
[PATCH v7 0/1] virtio-crypto: add Linux driver
v7:
- fix "BUG: smp_processor_id() in preemptible [00000000] code" reported by Halil,
using get_cpu/put_cpu instead of calling smp_processor_id() directly.
- fix a possible spinlock recursion in virtcrypto_dataq_callback(), we should
release the spinlock before invoking the callback.
- rebase on the latest kernel master tree.
v6:
- add patch 1/2 to make sparc architecture
2016 Dec 15
0
[Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver
...t; > +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...
2016 Dec 15
0
[Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver
...eue *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
> < > d...
2016 Nov 27
2
[PATCH v2 2/2] crypto: add virtio-crypto driver
...pto_common.h"
> +
> +
> +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);
> + do {
> + virtqueue_disable_cb(vq);
> + while ((vc_req = virtqueue_get_buf(vq, &len)) != NULL) {
> + if (vc_req->type == VIRTIO_CRYPTO_SYM_OP_CIPHER) {
> + switch (vc_req->status) {...
2016 Nov 27
2
[PATCH v2 2/2] crypto: add virtio-crypto driver
...pto_common.h"
> +
> +
> +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);
> + do {
> + virtqueue_disable_cb(vq);
> + while ((vc_req = virtqueue_get_buf(vq, &len)) != NULL) {
> + if (vc_req->type == VIRTIO_CRYPTO_SYM_OP_CIPHER) {
> + switch (vc_req->status) {...
2016 Nov 28
0
[virtio-dev] Re: [PATCH v2 2/2] crypto: add virtio-crypto driver
...t; > +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);
> > + do {
> > + virtqueue_disable_cb(vq);
> > + while ((vc_req = virtqueue_get_buf(vq, &len)) != NULL) {
> > + if (vc_req->type == VIRTIO_CRYPTO_SYM_OP_CIPHER) {
>...
2016 Nov 22
0
[PATCH v2 2/2] crypto: add virtio-crypto driver
...irtio_crypto.h>
+#include "virtio_crypto_common.h"
+
+
+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);
+ do {
+ virtqueue_disable_cb(vq);
+ while ((vc_req = virtqueue_get_buf(vq, &len)) != NULL) {
+ if (vc_req->type == VIRTIO_CRYPTO_SYM_OP_CIPHER) {
+ switch (vc_req->status) {
+ case VIRTIO_CRYPTO_OK:
+ error...
2016 Nov 28
0
[PATCH v3] crypto: add virtio-crypto driver
...irtio_crypto.h>
+#include "virtio_crypto_common.h"
+
+
+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);
+ do {
+ virtqueue_disable_cb(vq);
+ while ((vc_req = virtqueue_get_buf(vq, &len)) != NULL) {
+ if (vc_req->type == VIRTIO_CRYPTO_SYM_OP_CIPHER) {
+ switch (vc_req->status) {
+ case VIRTIO_CRYPTO_OK:
+ error...
2016 Nov 29
0
[PATCH v4 1/1] crypto: add virtio-crypto driver
...irtio_crypto.h>
+#include "virtio_crypto_common.h"
+
+
+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);
+ do {
+ virtqueue_disable_cb(vq);
+ while ((vc_req = virtqueue_get_buf(vq, &len)) != NULL) {
+ if (vc_req->type == VIRTIO_CRYPTO_SYM_OP_CIPHER) {
+ switch (vc_req->status) {
+ case VIRTIO_CRYPTO_OK:
+ error...