]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
vfio-user: clarify partial message handling
authorJohn Levon <john.levon@nutanix.com>
Wed, 3 Dec 2025 10:03:12 +0000 (15:33 +0530)
committerCédric Le Goater <clg@redhat.com>
Wed, 3 Dec 2025 14:07:47 +0000 (15:07 +0100)
Improve a comment for this.

Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Link: https://lore.kernel.org/qemu-devel/20251203100316.3604456-3-john.levon@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio-user/proxy.c

index 75845d7c89ecbc2534c6f1e3271d6a0dfff8e5cb..82c76c66654a1b7e03b281bdac5f602846b33ac6 100644 (file)
@@ -362,7 +362,10 @@ static int vfio_user_recv_one(VFIOUserProxy *proxy, Error **errp)
     while (msgleft > 0) {
         ret = qio_channel_read(proxy->ioc, data, msgleft, errp);
 
-        /* prepare to complete read on next iternation */
+        /*
+         * We'll complete this read on the next go around; keep track of the
+         * partial message until then.
+         */
         if (ret == QIO_CHANNEL_ERR_BLOCK) {
             proxy->part_recv = msg;
             proxy->recv_left = msgleft;