This is v2 of multiple interface support over multifd for live migration. Links of previous versions: v1: https://lore.kernel.org/qemu-devel/20220609073305.142515-1-het.g...@nutanix.com
Thanks to David, Daniel and Markus for their valuable insights. v1->v2 changelog: - little helper functions shifted/added inside util* file into a separate patch - HMP changes are split into separate patch - migrate_multifd_channel() API been restored - removed total_multifd_channel variable 'OutgoingMigrateParams' struct. - qio_channel_socket_connect_async and qio_channel_socket_connect_sync methods are not updated - instead introduced variants qio_channel_socket_connect_full_async and qio_channel_socket_connect_full_sync for connecting particular src and dest ips for live migration - added code for validation for mismatch of IPv4 vs IPv6 for src and dest addr. - Few nit whitespace changes in qemu-sockets, are split into separate patch. Abstract: ======== As of now, the multi-FD feature supports connection over the default network only. This Patchset series is a Qemu side implementation of providing multiple interfaces support for multi-FD. This enables us to fully utilize dedicated or multiple NICs in case bonding of NICs is not possible. What's new ========== The HMP code changes for source and destination side are split into a separate patch. Little helper functions for live migration from different patches have been added together into a single separate patch. migrate_multifd_channels existing API have been restored. Instead of pre-computing total_multifd_channels parameter and storing it in the struct, it is now calculted on the fly to reduce complexity, and are equal the number of multifd channels coming from live migration API and qmp monitor command, are verified. Instead of breaking existing methods while establishing connection between any non-default src and dest, created newer methods for accomodating src_addr as extra parameter for establishing connection. Added a check for validating no mismatch between src and dest ips for IPv4 vs IPv6 happens before connection is created. ---------------- Het Gala (7): multifd: adding more helper functions in util files for live migration multifd: modifying 'migrate' qmp command to add multifd socket on particular src and dest pair multifd: adding multi-interface support for multifd on destination side multifd: HMP changes for multifd source and destination side multifd: establishing connection between any non-default src and dest pair muitlfd: Correcting nit : whitespace error changes in qemu-sockets.c file multifd: adding support for multifd connections dynamically include/io/channel-socket.h | 44 ++++++++ include/qapi/util.h | 12 ++ include/qemu/sockets.h | 6 +- io/channel-socket.c | 93 ++++++++++++---- migration/migration.c | 195 ++++++++++++++++++++++++++++----- migration/migration.h | 2 + migration/multifd.c | 6 +- migration/socket.c | 106 ++++++++++++++---- migration/socket.h | 25 ++++- monitor/hmp-cmds.c | 66 +++++------ qapi/migration.json | 93 ++++++++++++++-- qapi/qapi-util.c | 36 ++++++ qemu-options.hx | 18 +++ softmmu/vl.c | 30 ++++- tests/unit/test-util-sockets.c | 16 +-- util/qemu-sockets.c | 112 +++++++++++++------ 16 files changed, 692 insertions(+), 168 deletions(-) -- 2.22.3