Hi,
I'm not sure how that should be done. My main dislike of the current interface is that it forces either a copy from the driver to an intermediate, like the code I had checked in, or it forces spice-server to consume everything it gets.
No, it isn't all or nothing. You can delay the intermediate copy until the wakeup() call returns, then only copy in case the server didn't consume all data.
I'm not sure this is worth the trouble though. With bulky data we likely have to throttle (and thus copy) frequently anyway. With low-bandwith data the extra copy doesn't hurt much.
The other is to have a havedata callback instead of read, called from driver, allow the havedata to return a boolean telling it if to throttle or not, and have another "unthrottle" function called from spice. - change of API + no additional copy of data
Yes, you need an additional interface for throttle/unthrottle then. Works too. I don't mind much which way we pick.
cheers, Gerd _______________________________________________ Spice-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/spice-devel
