[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 18/26] cryptodev-vhost-user: set the key length
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 18/26] cryptodev-vhost-user: set the key length |
Date: |
Thu, 8 Feb 2018 21:09:15 +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 7bd0929..11b834b 100644
--- a/backends/cryptodev-vhost-user.c
+++ b/backends/cryptodev-vhost-user.c
@@ -226,6 +226,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_AUTH_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 17/26] cryptodev-vhost-user: add crypto session handler, (continued)
- [Qemu-devel] [PULL 17/26] cryptodev-vhost-user: add crypto session handler, Michael S. Tsirkin, 2018/02/08
- [Qemu-devel] [PULL 16/26] cryptodev: add vhost support, Michael S. Tsirkin, 2018/02/08
- [Qemu-devel] [PULL 15/26] cryptodev: add vhost-user as a new cryptodev backend, Michael S. Tsirkin, 2018/02/08
- [Qemu-devel] [PULL 20/26] libvhost-user: Fix resource leak, Michael S. Tsirkin, 2018/02/08
- [Qemu-devel] [PULL 21/26] libvhost-user: Support across-memory-boundary access, Michael S. Tsirkin, 2018/02/08
- [Qemu-devel] [PULL 23/26] tests: acpi: fix FADT not being compared to reference table, Michael S. Tsirkin, 2018/02/08
- [Qemu-devel] [PULL 22/26] hw/pci-bridge: fix pcie root port's IO hints capability, Michael S. Tsirkin, 2018/02/08
- [Qemu-devel] [PULL 25/26] acpi-test: update FADT, Michael S. Tsirkin, 2018/02/08
- [Qemu-devel] [PULL 19/26] virtio-balloon: unref the memory region before continuing, Michael S. Tsirkin, 2018/02/08
- [Qemu-devel] [PULL 18/26] cryptodev-vhost-user: set the key length,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 24/26] lpc: drop pcie host dependency, Michael S. Tsirkin, 2018/02/08
- [Qemu-devel] [PULL 14/26] pci: removed the is_express field since a uniform interface was inserted, Michael S. Tsirkin, 2018/02/08
- [Qemu-devel] [PULL 26/26] virtio-balloon: include statistics of disk/file caches, Michael S. Tsirkin, 2018/02/08
- [Qemu-devel] [PULL 03/26] virtio: improve virtio devices initialization time, Michael S. Tsirkin, 2018/02/08
- Re: [Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features, fixes and cleanups, Peter Maydell, 2018/02/09
- Re: [Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features, fixes and cleanups, Michael S. Tsirkin, 2018/02/09
- Re: [Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features, fixes and cleanups, Peter Maydell, 2018/02/12
- Re: [Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features, fixes and cleanups, Peter Maydell, 2018/02/13
- Re: [Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features, fixes and cleanups, Michael S. Tsirkin, 2018/02/13
- Re: [Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features, fixes and cleanups, Peter Maydell, 2018/02/13