[PATCH 05/11] migration/multifd: Fix error message in multifd_recv_initial_packet()

Avihai Horon posted 11 patches 11 months ago
Maintainers: Juan Quintela <quintela@redhat.com>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, Leonardo Bras <leobras@redhat.com>, Li Zhijian <lizhijian@fujitsu.com>
[PATCH 05/11] migration/multifd: Fix error message in multifd_recv_initial_packet()
Posted by Avihai Horon 11 months ago
In multifd_recv_initial_packet(), if MultiFDInit_t->id is greater than
the configured number of multifd channels, an irrelevant error message
about multifd version is printed.

Change the error message to a relevant one about the channel id.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
---
 migration/multifd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/migration/multifd.c b/migration/multifd.c
index 409460684f..a6204fc72f 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -228,8 +228,8 @@ static int multifd_recv_initial_packet(QIOChannel *c, Error **errp)
     }
 
     if (msg.id > migrate_multifd_channels()) {
-        error_setg(errp, "multifd: received channel version %u "
-                   "expected %u", msg.version, MULTIFD_VERSION);
+        error_setg(errp, "multifd: received channel id %u is greater than "
+                   "number of channels %u", msg.id, migrate_multifd_channels());
         return -1;
     }
 
-- 
2.26.3
Re: [PATCH 05/11] migration/multifd: Fix error message in multifd_recv_initial_packet()
Posted by Fabiano Rosas 10 months, 4 weeks ago
Avihai Horon <avihaih@nvidia.com> writes:

> In multifd_recv_initial_packet(), if MultiFDInit_t->id is greater than
> the configured number of multifd channels, an irrelevant error message
> about multifd version is printed.
>
> Change the error message to a relevant one about the channel id.
>
> Signed-off-by: Avihai Horon <avihaih@nvidia.com>

Reviewed-by: Fabiano Rosas <farosas@suse.de>