On 2021/3/2 1:16 ??, Viresh Kumar wrote:> On 02-03-21, 13:06, Jie Deng wrote:
>> Yeah. Actually, the backend only needs "struct virtio_i2c_out_hdr
out_hdr"
>> and "struct virtio_i2c_in_hdr in_hdr" for communication. So
we only need to
>> keep
>> the first two in uapi and move "struct virtio_i2c_req" into
the driver.
>>
>> But Jason wanted to include "struct virtio_i2c_req" in uapi.
He explained in
>> this link
>>
https://lists.linuxfoundation.org/pipermail/virtualization/2020-October/050222.html.
>> Do you agree with that explanation ?
> I am not sure I understood his reasoning well, but it doesn't make any
> sense to keep this in uapi header if this is never going to get
> transferred over the wire.
I think I was wrong. It should be sufficient have in_hdr and out_hdr in
uAPI.
Thanks
>
> Moreover, the struct virtio_i2c_req in spec is misleading to me and
> rather creates unnecessary confusion. There is no structure like this
> which ever get passed here, but rather there are multiple vq
> transactions which take place, one with just the out header, then one
> with buffer and finally one with in header.
>
> I am not sure what's the right way of documenting it or if this is a
> standard virtio world follows.
>