aboutsummaryrefslogtreecommitdiff
path: root/backends/cryptodev-builtin.c
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2016-12-22 11:12:39 +0800
committerMichael S. Tsirkin <mst@redhat.com>2017-01-10 07:02:52 +0200
commit6138dbda5a4bfa6c724fd04b9225181d3a3c85a7 (patch)
treea730b7934ba7b92adbddea16d8dcb7969446b144 /backends/cryptodev-builtin.c
parent46fd17054548b15b3b8a5991492f5f0dc37957d4 (diff)
cryptodev: wrap the ready flag
The ready flag should be set by the children of cryptodev backend interface. Warp the setter/getter functions for it. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'backends/cryptodev-builtin.c')
-rw-r--r--backends/cryptodev-builtin.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/cryptodev-builtin.c b/backends/cryptodev-builtin.c
index 486b4a62bc..82a068e792 100644
--- a/backends/cryptodev-builtin.c
+++ b/backends/cryptodev-builtin.c
@@ -94,6 +94,8 @@ static void cryptodev_builtin_init(
backend->conf.max_size = LONG_MAX - sizeof(CryptoDevBackendSymOpInfo);
backend->conf.max_cipher_key_len = CRYPTODEV_BUITLIN_MAX_CIPHER_KEY_LEN;
backend->conf.max_auth_key_len = CRYPTODEV_BUITLIN_MAX_AUTH_KEY_LEN;
+
+ cryptodev_backend_set_ready(backend, true);
}
static int
@@ -366,6 +368,8 @@ static void cryptodev_builtin_cleanup(
backend->conf.peers.ccs[i] = NULL;
}
}
+
+ cryptodev_backend_set_ready(backend, false);
}
static void