[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [virtio-dev] [PATCH v18 1/2] virtio-crypto: Add virtio crypto device specification
On 05/16/2017 05:33 PM, Stefan Hajnoczi wrote: > On Sat, Apr 22, 2017 at 02:23:50PM +0800, Gonglei wrote: >> +Dataq requests for both session and stateless modes are as follows: >> + >> +\begin{lstlisting} >> +struct virtio_crypto_op_data_req_mux { >> + struct virtio_crypto_op_header header; >> + >> + union { >> + struct virtio_crypto_sym_data_req sym_req; >> + struct virtio_crypto_hash_data_req hash_req; >> + struct virtio_crypto_mac_data_req mac_req; >> + struct virtio_crypto_aead_data_req aead_req; >> + struct virtio_crypto_sym_data_req_stateless sym_stateless_req; >> + struct virtio_crypto_hash_data_req_stateless hash_stateless_req; >> + struct virtio_crypto_mac_data_req_stateless mac_stateless_req; >> + struct virtio_crypto_aead_data_req_stateless aead_stateless_req; >> + } u; >> +}; >> +\end{lstlisting} > > Halil touched on this in the discussion: this spec uses a C-like struct > syntax but does not define whether unions really affect sizeof(mystruct) > like they would in C or whether you just mean that any of the union > fields can be used. This distinction is important so device and driver > authors understand the exact memory layout of requests and responses. > > Please include an explanation about the meaning of "union" in the text. > I do not think simple explaining the union will do. I think this description is bleeding from more wounds. I tried to explain this while reviewing the implementation here: https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg03876.html Unfortunately some technical issues precluded me from posting it in a timely manner. @Stefan: Thanks for joining the discussion. Regards, Halil
Attachment:
signature.asc
Description: OpenPGP digital signature
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]