On Wed, May 13, 2015 at 07:16:13PM +0000, Subhashini Venkataraman wrote: > I have a question on VRING_DESC_F_WRITE flag. As per the specifications, if > this flag is set, then the corresponding buffer pointed by the descriptor is > Write only, otherwise Read Only. I am trying to understand why there is no > READ_AND_WRITE option, i.e. a buffer could be Read by device emulation and > written back into.
All virtio devices are designed so that descriptors are read-only or write-only. A typical request looks like this: [header (RO)][data (RO)][status (WO)] or [header (RO)][data (WO)][status (WO)] Not sure what the original requirement for this design was, but the read-only/write-only approach means that buffers could be sent over a transport (like a pipe or TCP socket). If a buffer was read-write then it would be involve sending back a modified copy, which is unnecessary. Stefan
pgp_Kf2hZh170.pgp
Description: PGP signature