qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 02/17] migration: Create migration_ioc_proces


From: Juan Quintela
Subject: Re: [Qemu-devel] [PATCH v5 02/17] migration: Create migration_ioc_process_incoming()
Date: Mon, 24 Jul 2017 13:09:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

"Daniel P. Berrange" <address@hidden> wrote:
> On Mon, Jul 17, 2017 at 03:42:23PM +0200, Juan Quintela wrote:
>> We need to receive the ioc to be able to implement multifd.
>> 
>> Signed-off-by: Juan Quintela <address@hidden>
>> ---
>>  migration/channel.c   |  3 +--
>>  migration/migration.c | 16 +++++++++++++---
>>  migration/migration.h |  2 ++
>>  3 files changed, 16 insertions(+), 5 deletions(-)
>> 
>> diff --git a/migration/channel.c b/migration/channel.c
>> index 719055d..5b777ef 100644
>> --- a/migration/channel.c
>> +++ b/migration/channel.c
>> @@ -36,8 +36,7 @@ gboolean migration_channel_process_incoming(QIOChannel 
>> *ioc)
>>              error_report_err(local_err);
>>          }
>>      } else {
>> -        QEMUFile *f = qemu_fopen_channel_input(ioc);
>> -        migration_fd_process_incoming(f);
>> +        return migration_ioc_process_incoming(ioc);
>>      }
>>      return FALSE; /* unregister */
>>  }
>
> This is going to break TLS with multi FD I'm afraid.
>
>
> We have two code paths:
>
>  1. Non-TLS
>
>     event loop POLLIN on migration listener socket
>      +-> socket_accept_incoming_migration()
>           +-> migration_channel_process_incoming()
>              +-> migration_ioc_process_incoming()
>                   -> returns FALSE if all required FD channels are now present
>
>  2. TLS
>
>     event loop POLLIN on migration listener socket
>      +-> socket_accept_incoming_migration()
>           +-> migration_channel_process_incoming()
>              +-> migration_tls_channel_process_incoming
>                   -> Registers watch for TLS handhsake on client socket
>                   -> returns FALSE immediately to remove listener watch
>
>     event loop POLLIN on migration *client* socket
>      +-> migration_tls_incoming_handshake
>           +-> migration_channel_process_incoming()
>              +-> migration_ioc_process_incoming()
>                   -> return value ignored
>

The part of the cover letter when I explained that TLS was not working
and asked for help was not chopped for user error.

I *think* that is fixed this correctly.

As this worked differently than I expected, I just changed how things
were done.

Thanks, Juan.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]