From: "Longpeng(Mike)" <longpeng2@huawei.com>
To: qemu-devel@nongnu.org, virtio-dev@lists.oasis-open.org
Cc: luonengjun@huawei.com, mst@redhat.com, cohuck@redhat.com,
stefanha@redhat.com, denglingli@chinamobile.com,
Jani.Kokkonen@huawei.com, Ola.Liljedahl@arm.com,
Varun.Sethi@freescale.com, xin.zeng@intel.com,
brian.a.keating@intel.com, liang.j.ma@intel.com,
john.griffin@intel.com, weidong.huang@huawei.com,
mike.caraman@nxp.com, agraf@suse.de, jasowang@redhat.com,
vincent.jardin@6wind.com, arei.gonglei@hotmail.com,
pasic@linux.vnet.ibm.com, wangxinxin.wang@huawei.com,
arei.gonglei@huawei.com, "Longpeng(Mike)" <longpeng2@huawei.com>
Subject: [Qemu-devel] [RFC 1/8] virtio-crypto: add new definations for multiplexing mode
Date: Mon, 11 Sep 2017 09:10:33 +0800 [thread overview]
Message-ID: <1505092240-10864-2-git-send-email-longpeng2@huawei.com> (raw)
In-Reply-To: <1505092240-10864-1-git-send-email-longpeng2@huawei.com>
Adds the defination of the control/operation header for
multiplexing mode.
Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
---
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
next prev parent reply other threads:[~2017-09-11 1:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-11 1:10 [Qemu-devel] [RFC 0/8] virtio-crypto: add multiplexing mode support Longpeng(Mike)
2017-09-11 1:10 ` Longpeng(Mike) [this message]
2017-09-11 1:10 ` [Qemu-devel] [RFC 2/8] virtio-crypto: add session creation logic for mux mode Longpeng(Mike)
2017-09-11 1:10 ` [Qemu-devel] [RFC 3/8] virtio-crypto: add dataq operation " Longpeng(Mike)
2017-09-11 1:10 ` [Qemu-devel] [RFC 4/8] cryptodev: add stateless mode cipher support Longpeng(Mike)
2017-09-11 1:10 ` [Qemu-devel] [RFC 5/8] virtio-crypto: add stateless crypto request handler Longpeng(Mike)
2017-09-11 1:10 ` [Qemu-devel] [RFC 6/8] cryptodev: extract one util function Longpeng(Mike)
2017-09-11 1:10 ` [Qemu-devel] [RFC 7/8] cryptodev-builtin: add stateless cipher support Longpeng(Mike)
2017-09-11 1:10 ` [Qemu-devel] [RFC 8/8] virtio-crypto: add host feature bits support Longpeng(Mike)
2017-09-11 1:26 ` [Qemu-devel] [RFC 0/8] virtio-crypto: add multiplexing mode support no-reply
2017-09-13 18:14 ` Halil Pasic
2017-09-14 0:58 ` [Qemu-devel] [virtio-dev] " Longpeng (Mike)
2017-09-15 17:33 ` Halil Pasic
2017-09-18 1:17 ` [Qemu-devel] [virtio-dev] " Longpeng (Mike)
2017-10-06 14:24 ` Halil Pasic
2017-10-09 9:22 ` Gonglei (Arei)
2017-10-09 11:04 ` Halil Pasic
2017-10-09 11:17 ` Gonglei (Arei)
2017-10-10 8:35 ` Longpeng (Mike)
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=1505092240-10864-2-git-send-email-longpeng2@huawei.com \
--to=longpeng2@huawei.com \
--cc=Jani.Kokkonen@huawei.com \
--cc=Ola.Liljedahl@arm.com \
--cc=Varun.Sethi@freescale.com \
--cc=agraf@suse.de \
--cc=arei.gonglei@hotmail.com \
--cc=arei.gonglei@huawei.com \
--cc=brian.a.keating@intel.com \
--cc=cohuck@redhat.com \
--cc=denglingli@chinamobile.com \
--cc=jasowang@redhat.com \
--cc=john.griffin@intel.com \
--cc=liang.j.ma@intel.com \
--cc=luonengjun@huawei.com \
--cc=mike.caraman@nxp.com \
--cc=mst@redhat.com \
--cc=pasic@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=vincent.jardin@6wind.com \
--cc=virtio-dev@lists.oasis-open.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).