Re: [PATCH v3 2/5] vfio-user: clarify partial message handling

2025-12-02 Thread Mark Cave-Ayland

On 01/12/2025 09:56, John Levon wrote:


Improve a comment for this.

Signed-off-by: John Levon 
---
  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;


Reviewed-by: Mark Cave-Ayland 


ATB,

Mark.




[PATCH v3 2/5] vfio-user: clarify partial message handling

2025-12-01 Thread John Levon
Improve a comment for this.

Signed-off-by: John Levon 
---
 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