On Wed, Jan 17, 2024 at 02:34:18PM -0300, Fabiano Rosas wrote: > Well this sequence: > > multifd_new_send_channel_async() -> multifd_channel_connect() -> > multifd_tls_channel_connect() -> new thread -> > multifd_tls_handshake_thread() -> new task -> > multifd_tls_outgoing_handshake() -> multifd_channel_connect() > > ...is not what I would call intuitive. Specifically with > multifd_channel_connect() being called more than the number of multifd > channels. > > This would be "not a mess" IMO: > > for (i = 0; i < migrate_multifd_channels(); i++) { > multifd_tls_channel_connect(); > multifd_channel_connect() -> > qemu_thread_create(..., multifd_send_thread); > }
Ah, I see what you meant now, yes I agree. Let's see whether we can have a simple procedure for file first, then the possibility to make the socket path closer to file. TLS could be another story, I'm guessing Dan could have good reasons to do it like that, but we can rethink after we settle the file specific paths. -- Peter Xu