qemu-devel
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]