[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 1/8] virtio-crypto: add new definations for multiplexi
From: |
Longpeng(Mike) |
Subject: |
[Qemu-devel] [RFC 1/8] virtio-crypto: add new definations for multiplexing mode |
Date: |
Mon, 11 Sep 2017 09:10:33 +0800 |
Adds the defination of the control/operation header for
multiplexing mode.
Signed-off-by: Longpeng(Mike) <address@hidden>
---
include/standard-headers/linux/virtio_crypto.h | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/include/standard-headers/linux/virtio_crypto.h
b/include/standard-headers/linux/virtio_crypto.h
index 5ff0b4e..987fb1e 100755
--- a/include/standard-headers/linux/virtio_crypto.h
+++ b/include/standard-headers/linux/virtio_crypto.h
@@ -38,6 +38,13 @@
#define VIRTIO_CRYPTO_SERVICE_MAC 2
#define VIRTIO_CRYPTO_SERVICE_AEAD 3
+/* The features for virtio crypto device */
+#define VIRTIO_CRYPTO_F_MUX_MODE 0
+#define VIRTIO_CRYPTO_F_CIPHER_STATELESS_MODE 1
+#define VIRTIO_CRYPTO_F_HASH_STATELESS_MODE 2
+#define VIRTIO_CRYPTO_F_MAC_STATELESS_MODE 3
+#define VIRTIO_CRYPTO_F_AEAD_STATELESS_MODE 4
+
#define VIRTIO_CRYPTO_OPCODE(service, op) (((service) << 8) | (op))
struct virtio_crypto_ctrl_header {
@@ -234,7 +241,7 @@ struct virtio_crypto_destroy_session_req {
uint8_t padding[48];
};
-/* The request of the control virtqueue's packet */
+/* The request of the control virtqueue's packet for non-MUX mode */
struct virtio_crypto_op_ctrl_req {
struct virtio_crypto_ctrl_header header;
@@ -253,6 +260,11 @@ struct virtio_crypto_op_ctrl_req {
} u;
};
+/* The request of the control virtqueue's packet for MUX mode */
+struct virtio_crypto_op_ctrl_req_mux {
+ struct virtio_crypto_ctrl_header header;
+};
+
struct virtio_crypto_op_header {
#define VIRTIO_CRYPTO_CIPHER_ENCRYPT \
VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_CIPHER, 0x00)
@@ -390,7 +402,7 @@ struct virtio_crypto_aead_data_req {
uint8_t padding[32];
};
-/* The request of the data virtqueue's packet */
+/* The request of the data virtqueue's packet for non-MUX mode */
struct virtio_crypto_op_data_req {
struct virtio_crypto_op_header header;
@@ -403,6 +415,11 @@ struct virtio_crypto_op_data_req {
} u;
};
+/* The request of the data virtqueue's packet for MUX mode */
+struct virtio_crypto_op_data_req_mux {
+ struct virtio_crypto_op_header header;
+};
+
#define VIRTIO_CRYPTO_OK 0
#define VIRTIO_CRYPTO_ERR 1
#define VIRTIO_CRYPTO_BADMSG 2
--
1.8.3.1
- [Qemu-devel] [RFC 0/8] virtio-crypto: add multiplexing mode support, Longpeng(Mike), 2017/09/10
- [Qemu-devel] [RFC 3/8] virtio-crypto: add dataq operation logic for mux mode, Longpeng(Mike), 2017/09/10
- [Qemu-devel] [RFC 4/8] cryptodev: add stateless mode cipher support, Longpeng(Mike), 2017/09/10
- [Qemu-devel] [RFC 8/8] virtio-crypto: add host feature bits support, Longpeng(Mike), 2017/09/10
- [Qemu-devel] [RFC 7/8] cryptodev-builtin: add stateless cipher support, Longpeng(Mike), 2017/09/10
- [Qemu-devel] [RFC 6/8] cryptodev: extract one util function, Longpeng(Mike), 2017/09/10
- [Qemu-devel] [RFC 5/8] virtio-crypto: add stateless crypto request handler, Longpeng(Mike), 2017/09/10
- [Qemu-devel] [RFC 2/8] virtio-crypto: add session creation logic for mux mode, Longpeng(Mike), 2017/09/10
- [Qemu-devel] [RFC 1/8] virtio-crypto: add new definations for multiplexing mode,
Longpeng(Mike) <=
- Re: [Qemu-devel] [RFC 0/8] virtio-crypto: add multiplexing mode support, no-reply, 2017/09/10
- Re: [Qemu-devel] [RFC 0/8] virtio-crypto: add multiplexing mode support, Halil Pasic, 2017/09/13