From: John Levon <john.levon@nutanix.com>
To: qemu-devel@nongnu.org
Cc: "John Levon" <john.levon@nutanix.com>,
"Thanos Makatos" <thanos.makatos@nutanix.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Cédric Le Goater" <clg@redhat.com>
Subject: [PATCH v3 2/5] vfio-user: clarify partial message handling
Date: Mon, 1 Dec 2025 15:26:18 +0530 [thread overview]
Message-ID: <20251201095621.2786318-3-john.levon@nutanix.com> (raw)
In-Reply-To: <20251201095621.2786318-1-john.levon@nutanix.com>
Improve a comment for this.
Signed-off-by: John Levon <john.levon@nutanix.com>
---
hw/vfio-user/proxy.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/vfio-user/proxy.c b/hw/vfio-user/proxy.c
index 75845d7c89..82c76c6665 100644
--- a/hw/vfio-user/proxy.c
+++ b/hw/vfio-user/proxy.c
@@ -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;
--
2.43.0
next prev parent reply other threads:[~2025-12-01 9:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 9:56 [PATCH v3 0/5] vfio-user coverity fixes John Levon
2025-12-01 9:56 ` [PATCH v3 1/5] vfio-user: simplify vfio_user_process() John Levon
2025-12-02 10:42 ` Mark Cave-Ayland
2025-12-01 9:56 ` John Levon [this message]
2025-12-02 10:43 ` [PATCH v3 2/5] vfio-user: clarify partial message handling Mark Cave-Ayland
2025-12-01 9:56 ` [PATCH v3 3/5] vfio-user: refactor out header handling John Levon
2025-12-02 10:53 ` Mark Cave-Ayland
2025-12-03 7:40 ` Cédric Le Goater
2025-12-01 9:56 ` [PATCH v3 4/5] vfio-user: simplify vfio_user_recv_one() John Levon
2025-12-02 11:11 ` Mark Cave-Ayland
2025-12-01 9:56 ` [PATCH v3 5/5] vfio-user: recycle msg on failure John Levon
2025-12-02 11:14 ` Mark Cave-Ayland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251201095621.2786318-3-john.levon@nutanix.com \
--to=john.levon@nutanix.com \
--cc=clg@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thanos.makatos@nutanix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).