[virtio-dev] Re: [PATCH 2/2] admin: Make optional command data type to u8

Michael S. Tsirkin
2023-05-02T07:38:01Z

On Tue, May 02, 2023 at 01:44:30AM +0300, Parav Pandit wrote:
> Command data content is specific to command opcode.
> This is similar to command result field
> command_specific_result.
>
> Hence, make it u8.
>
> This patch is on top of [1].
>
> [1] https://lore.kernel.org/virtio-comment/cover.1682354275.git.mst@redhat.com/T/#t
>
> Signed-off-by: Parav Pandit <parav@nvidia.com>

Thanks for the patch. It was like this originally but readers were
confused. The point of marking it le64 is to make it clear it's size is
a multiple of 8 bytes, thus 64 bits. And format of fields inside it is
generally LE.

> ---
> admin.tex | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/admin.tex b/admin.tex
> index 037e2e6..648253c 100644
> --- a/admin.tex
> +++ b/admin.tex
> @@ -85,7 +85,7 @@ \subsection{Group administration commands}\label{sec:Basic Facilities of a Virti
> /* unused, reserved for future extensions */
> u8 reserved1[12];
> le64 group_member_id;
> - le64 command_specific_data[];
> + u8 command_specific_data[];
>
> /* Device-writable part */
> le16 status;
> --
> 2.26.2