qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [v22 1/2] virtio-crypto: Add virtio crypto device speci


From: Halil Pasic
Subject: Re: [Qemu-devel] [v22 1/2] virtio-crypto: Add virtio crypto device specification
Date: Wed, 6 Dec 2017 12:01:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0


On 12/06/2017 08:37 AM, Longpeng(Mike) wrote:
> +\field{outcome_len} is the size of struct virtio_crypto_session_input or
> +ZERO for the session-destroy operation.

This ain't correct. It should have been something like 
virtio_crypto_destroy_session_input.

> +
> +
> +\paragraph{Session operation}\label{sec:Device Types / Crypto Device / Device
> +Operation / Control Virtqueue / Session operation}
> +
> +The session is a handle which describes the cryptographic parameters to be
> +applied to a number of buffers.
> +
> +The following structure stores the result of session creation set by the 
> device:
> +
> +\begin{lstlisting}
> +struct virtio_crypto_session_input {
> +    /* Device write only portion */
> +    le64 session_id;
> +    le32 status;
> +    le32 padding;
> +};
> +\end{lstlisting}
> +
> +A request to destroy a session includes the following information:
> +
> +\begin{lstlisting}
> +struct virtio_crypto_destroy_session_flf {
> +    /* Device read only portion */
> +    le64  session_id;
> +    /* Device write only portion */

This is the device writable portion and thus what we cal op_outcome above.
So it should have been
};


struct virtio_crypto_destroy_session_input {
> +    le32  status;
> +    le32  padding;
> +};

If we aren't consistent about it the dividing into parts (like op specific
fixed and variable length (output) fields, operation outcome (input))
isn't really helpful.


Regards,
Halil
> +\end{lstlisting}




reply via email to

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