Files
qemu/migration/fd.h
Fabiano Rosas 03a680c978 migration/channel: Centralize calling migration_channel_connect_outgoing
Make the synchronous calls evident by not hiding the call to
migration_channel_connect_outgoing() in the transport code. Have those
functions return and call the function at the upper level.

This helps with navigation: the transport code returns the ioc,
there's no need to look into them when browsing the code.

It also allows RDMA in the source side to use the same path as the
rest of the transports.

While here, document the async calls which are the exception.

Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Prasad Pandit <pjp@fedoraproject.org>
Link: https://lore.kernel.org/qemu-devel/20260123141656.6765-26-farosas@suse.de
Signed-off-by: Fabiano Rosas <farosas@suse.de>
2026-01-23 11:34:25 -03:00

27 lines
715 B
C

/*
* QEMU live migration via generic fd
*
* Copyright Red Hat, Inc. 2009-2016
*
* Authors:
* Chris Lalancette <clalance@redhat.com>
* Daniel P. Berrange <berrange@redhat.com>
*
* This work is licensed under the terms of the GNU GPL, version 2. See
* the COPYING file in the top-level directory.
*
* Contributions after 2012-01-13 are licensed under the terms of the
* GNU GPL, version 2 or (at your option) any later version.
*/
#ifndef QEMU_MIGRATION_FD_H
#define QEMU_MIGRATION_FD_H
#include "io/channel.h"
void fd_connect_incoming(const char *fdname, Error **errp);
QIOChannel *fd_connect_outgoing(MigrationState *s, const char *fdname,
Error **errp);
#endif