All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jay Zhou <jianjay.zhou@huawei.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, pbonzini@redhat.com, weidong.huang@huawei.com,
	stefanha@redhat.com, jianjay.zhou@huawei.com,
	pasic@linux.vnet.ibm.com, longpeng2@huawei.com,
	xin.zeng@intel.com, roy.fan.zhang@intel.com,
	arei.gonglei@huawei.com, wangxinxin.wang@huawei.com
Subject: [Qemu-devel] [PATCH v4 4/5] cryptodev-vhost-user: set the key length
Date: Thu, 18 Jan 2018 20:25:35 +0800	[thread overview]
Message-ID: <f627f9669577793f6cc593c724770ab0b042474f.1516277913.git.arei.gonglei@huawei.com> (raw)
In-Reply-To: <cover.1516277913.git.arei.gonglei@huawei.com>

From: Gonglei <arei.gonglei@huawei.com>

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
---
 backends/cryptodev-vhost-user.c       | 4 ++++
 include/sysemu/cryptodev-vhost-user.h | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/backends/cryptodev-vhost-user.c b/backends/cryptodev-vhost-user.c
index 061c0e5..c7a9848 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(
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:
-- 
1.8.3.1

  parent reply	other threads:[~2018-01-18 12:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 12:25 [Qemu-devel] [PATCH v4 0/5] cryptodev: add vhost support Jay Zhou
2018-01-18 12:25 ` [Qemu-devel] [PATCH v4 1/5] cryptodev: add vhost-user as a new cryptodev backend Jay Zhou
2018-01-18 12:25 ` [Qemu-devel] [PATCH v4 2/5] cryptodev: add vhost support Jay Zhou
2018-01-18 12:25 ` [Qemu-devel] [PATCH v4 3/5] cryptodev-vhost-user: add crypto session handler Jay Zhou
2018-01-18 12:25 ` Jay Zhou [this message]
2018-01-18 12:25 ` [Qemu-devel] [PATCH v4 5/5] cryptodev-vhost-user: depend on CONFIG_VHOST_CRYPTO and CONFIG_VHOST_USER Jay Zhou
2018-01-18 20:49   ` Michael S. Tsirkin
2018-01-18 12:43 ` [Qemu-devel] [PATCH v4 0/5] cryptodev: add vhost support no-reply
2018-01-18 12:44 ` no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f627f9669577793f6cc593c724770ab0b042474f.1516277913.git.arei.gonglei@huawei.com \
    --to=jianjay.zhou@huawei.com \
    --cc=arei.gonglei@huawei.com \
    --cc=longpeng2@huawei.com \
    --cc=mst@redhat.com \
    --cc=pasic@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=roy.fan.zhang@intel.com \
    --cc=stefanha@redhat.com \
    --cc=wangxinxin.wang@huawei.com \
    --cc=weidong.huang@huawei.com \
    --cc=xin.zeng@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.