[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [virtio-dev] Preferred layout for request/response structs
On Tue, Apr 21, 2020 at 09:30:30PM +0900, Keiichi Watanabe wrote: > Hi Stefan, > > Thank you for your advice! > > Your comments totally make sense. We should keep structs simple and I > should have thought the spec and implementation separately. > tl;dr: I feel comfortable with the following design after rethinking: > > struct virtio_video_resource_queue { > le32 virtio_video_cmd_type type; /* Must be an enum variant > VIRTIO_VIDEO_CMD_TYPE_RESOURCE_QUEUE */ > le32 queue_type; > ... > }; > struct virtio_video_resource_queue_resp { > le32 virtio_video_resp_type type; /* Must be an enum variant that > represents the result of the command; Success or error type */ > ... > }; > > Regarding the decoding problem in a device, we should define another > set of structs when implementing the device if it is needed. > Let me reply to your comments inline and explain the reason of my thought. This and your replies to my comments sounds good. Thanks! Stefan
Attachment:
signature.asc
Description: PGP signature
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]