On 2020/9/10 21:25, Daniel P. Berrangé wrote:
> On Wed, Sep 09, 2020 at 10:52:56PM +0800, Chuan Zheng wrote:
>> add support for multifd tls-handshake
>>
>> Signed-off-by: Chuan Zheng <zhengch...@huawei.com>
>> Signed-off-by: Yan Jin <jinya...@huawei.com>
>> ---
>> migration/multifd.c | 32 +++++++++++++++++++++++++++++++-
>> 1 file changed, 31 insertions(+), 1 deletion(-)
>>
>> diff --git a/migration/multifd.c b/migration/multifd.c
>> index b2076d7..2509187 100644
>> --- a/migration/multifd.c
>> +++ b/migration/multifd.c
>> @@ -719,11 +719,41 @@ out:
>> return NULL;
>> }
>>
>> +static bool multifd_channel_connect(MultiFDSendParams *p,
>> + QIOChannel *ioc,
>> + Error *error);
>> +
>> +static void multifd_tls_outgoing_handshake(QIOTask *task,
>> + gpointer opaque)
>> +{
>> + MultiFDSendParams *p = opaque;
>> + QIOChannel *ioc = QIO_CHANNEL(qio_task_get_source(task));
>> + Error *err = NULL;
>> +
>> + qio_task_propagate_error(task, &err);
>> + multifd_channel_connect(p, ioc, err);
>> +}
>> +
>> static void multifd_tls_channel_connect(MultiFDSendParams *p,
>> QIOChannel *ioc,
>> Error **errp)
>> {
>> - /* TODO */
>> + MigrationState *s = p->s;
>> + const char *hostname = s->hostname;
>> + QIOChannelTLS *tioc;
>> +
>> + tioc = migration_tls_client_create(s, ioc, hostname, errp);
>> + if (!tioc) {
>> + return;
>> + }
>> +
>> + qio_channel_set_name(QIO_CHANNEL(tioc), "multifd-tls-outgoing");
>> + qio_channel_tls_handshake(tioc,
>> + multifd_tls_outgoing_handshake,
>> + p,
>> + NULL,
>> + NULL);
>> +
>> }
>
>
> Please squash this back into the previous patch, and both are
> inter-dependant on each other, and thus don't make sense to split
>
> Assuming it is squashed in
>
> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com>
>
OK, will squash it in v2
>
>
> Regards,
> Daniel
>