On 16-08-21, 10:45, Michael S. Tsirkin wrote:
On Mon, Aug 16, 2021 at 03:17:23PM +0530, Viresh Kumar wrote:
The I2C protocol allows zero-length requests with no data, like the SMBus Quick command, where the command is inferred based on the read/write flag itself.
So I wonder. What if we allow zero-length buffers in virtio? Would that address the need?
There are three things this patch does, all of which are important IMO:
1. Drop the need of passing both write and read buffers, as that isn't required really since we already have another way of linking different transfers using the fail-next flag.
2. Make the buffer optional, for zero-length transfers.
3. Pass the r/w flag separately, which is kind of relevant because of 2 (zero-length transfers) only.
I think (1) can be done separately anyway, and we may be able to solve (2) and (3) if we allow zero-length buffers in virtio itself.