[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 13/13] cryptodev-vhost-user: set the key length
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 13/13] cryptodev-vhost-user: set the key length |
Date: |
Thu, 1 Mar 2018 18:46:07 +0200 |
From: Gonglei <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
include/sysemu/cryptodev-vhost-user.h | 3 +++
backends/cryptodev-vhost-user.c | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/include/sysemu/cryptodev-vhost-user.h
b/include/sysemu/cryptodev-vhost-user.h
index 937217b..6debf53 100644
--- a/include/sysemu/cryptodev-vhost-user.h
+++ b/include/sysemu/cryptodev-vhost-user.h
@@ -23,6 +23,9 @@
#ifndef CRYPTODEV_VHOST_USER_H
#define CRYPTODEV_VHOST_USER_H
+#define VHOST_USER_MAX_AUTH_KEY_LEN 512
+#define VHOST_USER_MAX_CIPHER_KEY_LEN 64
+
/**
* cryptodev_vhost_user_get_vhost:
diff --git a/backends/cryptodev-vhost-user.c b/backends/cryptodev-vhost-user.c
index 9cd06c4..862d4f2 100644
--- a/backends/cryptodev-vhost-user.c
+++ b/backends/cryptodev-vhost-user.c
@@ -224,6 +224,10 @@ static void cryptodev_vhost_user_init(
1u << VIRTIO_CRYPTO_SERVICE_MAC;
backend->conf.cipher_algo_l = 1u << VIRTIO_CRYPTO_CIPHER_AES_CBC;
backend->conf.hash_algo = 1u << VIRTIO_CRYPTO_HASH_SHA1;
+
+ backend->conf.max_size = UINT64_MAX;
+ backend->conf.max_cipher_key_len = VHOST_USER_MAX_CIPHER_KEY_LEN;
+ backend->conf.max_auth_key_len = VHOST_USER_MAX_AUTH_KEY_LEN;
}
static int64_t cryptodev_vhost_user_sym_create_session(
--
MST
- [Qemu-devel] [PULL 01/13] vhost-user: fix memory leak, (continued)
- [Qemu-devel] [PULL 01/13] vhost-user: fix memory leak, Michael S. Tsirkin, 2018/03/01
- [Qemu-devel] [PULL 02/13] virtio-pci: trivial fixes in error message, Michael S. Tsirkin, 2018/03/01
- [Qemu-devel] [PULL 04/13] docs: document virtio-balloon stats, Michael S. Tsirkin, 2018/03/01
- [Qemu-devel] [PULL 09/13] docs/vmcoreinfo: detail unsupported host format behaviour, Michael S. Tsirkin, 2018/03/01
- [Qemu-devel] [PULL 05/13] docs: pcie: Spell out machine type needs for PCIe features, Michael S. Tsirkin, 2018/03/01
- [Qemu-devel] [PULL 06/13] vhost: fix memslot limit check, Michael S. Tsirkin, 2018/03/01
- [Qemu-devel] [PULL 11/13] cryptodev: add vhost support, Michael S. Tsirkin, 2018/03/01
- [Qemu-devel] [PULL 10/13] cryptodev: add vhost-user as a new cryptodev backend, Michael S. Tsirkin, 2018/03/01
- [Qemu-devel] [PULL 07/13] vhost: avoid to start/stop virtqueue which is not ready, Michael S. Tsirkin, 2018/03/01
- [Qemu-devel] [PULL 08/13] vhost: fix incorrect check in vhost_verify_ring_mappings, Michael S. Tsirkin, 2018/03/01
- [Qemu-devel] [PULL 13/13] cryptodev-vhost-user: set the key length,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 12/13] cryptodev-vhost-user: add crypto session handler, Michael S. Tsirkin, 2018/03/01
- Re: [Qemu-devel] [PULL 00/13] virtio, vhost, pci, pc: features, fixes and cleanups, no-reply, 2018/03/01
- Re: [Qemu-devel] [PULL 00/13] virtio, vhost, pci, pc: features, fixes and cleanups, no-reply, 2018/03/01
- Re: [Qemu-devel] [PULL 00/13] virtio, vhost, pci, pc: features, fixes and cleanups, Peter Maydell, 2018/03/02