Anthony Liguori wrote: > I think this is a pretty fundamental issue to work out since it > determines the very nature of the transport (stream vs. datagram).
For the record, I don't think there's anything _wrong_ with a datagram transport. It would be quite useful sometimes. But if there is datagram support, it should be optional, just like you can choose between SOCK_STREAM and SOCK_DGRAM for AF_UNIX sockets. Something else occurred to me with the cut buffer application: What happens if the guest crashes, kexecs or whatever when it's half way through sending a cut buffer? A stream protocol will not have a nice way to recover from that unless there is an additional "out of band" way to say "I'm starting again". Does virtio-serial have an "I'm starting again" which is passed to the host side application? > Because you have to put a max buffer size on the transport, I think > buffering is a really flawed approach provably equivalent to just > increasing the message size within the transport. In general, the later > is a better approach because then the guest is using it's memory vs. > using host memory. I agree, using guest memory for the buffer also means there doesn't have to be an arbitrary limit on the buffer size, or a time limit. It can just wait there until it's consumed or the guest decides to restart. -- Jamie