[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 01/12] virtio-crypto: introduce virtio_crypto
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v6 01/12] virtio-crypto: introduce virtio_crypto.h |
Date: |
Mon, 10 Oct 2016 14:58:24 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 10/10/2016 03:43 AM, Gonglei wrote:
> Introduce the virtio_crypto.h which follows
> virtio-crypto specification.
>
> Signed-off-by: Gonglei <address@hidden>
> ---
> include/standard-headers/linux/virtio_crypto.h | 381
> +++++++++++++++++++++++++
> 1 file changed, 381 insertions(+)
> create mode 100644 include/standard-headers/linux/virtio_crypto.h
>
> diff --git a/include/standard-headers/linux/virtio_crypto.h
> b/include/standard-headers/linux/virtio_crypto.h
> new file mode 100644
> index 0000000..a62d192
> --- /dev/null
> +++ b/include/standard-headers/linux/virtio_crypto.h
> @@ -0,0 +1,381 @@
> +#ifndef _VIRTIO_CRYPTO_H
> +#define _VIRTIO_CRYPTO_H
Missing a copyright and license notice. Is this header copied from
Linux, or is it new to qemu? At any rate, being explicit about your
license is important (in qemu, files without a license are GPLv2+;
whereas the Linux kernel tends to favor GPLv2-only).
> +
> +#include "standard-headers/linux/types.h"
> +#include "standard-headers/linux/virtio_config.h"
> +#include "standard-headers/linux/virtio_types.h"
> +
> +
> +#define VIRTIO_CRYPTO_SERVICE_CIPHER (0)
> +#define VIRTIO_CRYPTO_SERVICE_HASH (1)
> +#define VIRTIO_CRYPTO_SERVICE_MAC (2)
> +#define VIRTIO_CRYPTO_SERVICE_AEAD (3)
Technically over-parenthesized, but doesn't hurt.
> +
> +#define VIRTIO_CRYPTO_OPCODE(service, op) ((service << 8) | (op))
Under-parenthesized. You need more () around service.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v6 00/12] virtio-crypto: introduce framework and device emulation, Gonglei, 2016/10/10
- [Qemu-devel] [PATCH v6 12/12] virtio-crypto-test: add qtest case for virtio-crypto, Gonglei, 2016/10/10
- [Qemu-devel] [PATCH v6 06/12] virtio-crypto: add control queue handler, Gonglei, 2016/10/10
- [Qemu-devel] [PATCH v6 10/12] virtio-crypto: perfect algorithms chainning support, Gonglei, 2016/10/10
- [Qemu-devel] [PATCH v6 01/12] virtio-crypto: introduce virtio_crypto.h, Gonglei, 2016/10/10
- Re: [Qemu-devel] [PATCH v6 01/12] virtio-crypto: introduce virtio_crypto.h,
Eric Blake <=
- [Qemu-devel] [PATCH v6 02/12] cryptodev: introduce a new cryptodev backend, Gonglei, 2016/10/10
- [Qemu-devel] [PATCH v6 08/12] cryptodev: introduce an unified wrapper for crypto operation, Gonglei, 2016/10/10
- Re: [Qemu-devel] [PATCH v6 00/12] virtio-crypto: introduce framework and device emulation, Gonglei (Arei), 2016/10/10
- [Qemu-devel] [PATCH v6 05/12] virtio-crypto: set capacity of algorithms supported, Gonglei, 2016/10/10
- [Qemu-devel] [PATCH v6 11/12] virtio-crypto: emulate virtio crypto as a legacy device by default, Gonglei, 2016/10/10
- [Qemu-devel] [PATCH v6 04/12] virtio-crypto-pci: add virtio crypto pci support, Gonglei, 2016/10/10
- [Qemu-devel] [PATCH v6 07/12] virtio-crypto: add data queue processing handler, Gonglei, 2016/10/10
- [Qemu-devel] [PATCH v6 03/12] virtio-crypto: add virtio crypto device emulation, Gonglei, 2016/10/10
- [Qemu-devel] [PATCH v6 09/12] virtio-crypto: add myself as virtio-crypto and cryptodev backends maintainer, Gonglei, 2016/10/10