OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-comment] [PATCH v6] virtio-i2c: add the device specification



On 2021/1/7 2:11, Stefan Hajnoczi wrote:
On Thu, Dec 24, 2020 at 04:10:43PM +0800, Jie Deng wrote:
+\begin{lstlisting}
+struct virtio_i2c_out_hdr {
+        le16 addr;
+        le16 padding;
+        le32 flags;
+};
+\end{lstlisting}
+
+\begin{lstlisting}
+struct virtio_i2c_in_hdr {
+        u8 status;
+};
+\end{lstlisting}
+
+\begin{lstlisting}
+struct virtio_i2c_req {
+        struct virtio_i2c_out_hdr out_hdr;
+        u8 write_buf[];
+        u8 read_buf[];
+        struct virtio_i2c_in_hdr in_hdr;
+};
+\end{lstlisting}
I didn't notice that the written and read fields were removed. Does this
mean that struct virtio_i2c_req can either be read or write, but not
read+write?

It can be read, write or read+write.

written/read are removed according to Michael's suggest. He preferred to directly use the read/write flags in descriptors.

Please refer to https://lists.oasis-open.org/archives/virtio-comment/202012/msg00045.html

This makes sense if virtqueue buffers can be grouped together so
bi-directional transfers can be described using multiple buffers. Just
wanted to check if I understand this correctly.

Thanks,
Stefan


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]