[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v10 04/24] migration: Set the migration tcp port
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH v10 04/24] migration: Set the migration tcp port |
Date: |
Wed, 14 Mar 2018 15:51:11 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Daniel P. Berrange <address@hidden> wrote:
> On Wed, Mar 07, 2018 at 11:59:50AM +0100, Juan Quintela wrote:
>> We can set the port parameter as zero. This patch lets us know what
>> port the system was choosen for us. Now we can migrate to this place.
>>
>> Signed-off-by: Juan Quintela <address@hidden>
>> +void migrate_set_port(const uint16_t port, Error **errp)
>> +{
>> + MigrateSetParameters p = {
>> + .has_x_tcp_port = true,
>> + .x_tcp_port = port,
>> + };
>> +
>> + qmp_migrate_set_parameters(&p, errp);
>> +}
>
> This is really not nice - it is requiring the QMP 'migrate-set-parameters'
> command to accept an extra field that is never something we want the end
> user to be allowed to set. We should not use the public QMP schema for
> data items we are just passing between 2 internal pieces of code.
void migrate_set_address(SocketAddress *address)
{
MigrationState *s = migrate_get_current();
s->parameters.has_x_socket_address = true;
s->parameters.x_socket_address = address;
}
I hope that is ok with you O:-)
Later, Juan.
PD. Yes, I agree about not using QMP inside two pieces of code, but on
the other hand, it make this so *future* proof O:-)
- [Qemu-devel] [RFC v10 00/24] Multifd, Juan Quintela, 2018/03/07
- [Qemu-devel] [PATCH v10 04/24] migration: Set the migration tcp port, Juan Quintela, 2018/03/07
- [Qemu-devel] [PATCH v10 12/24] migration: Reference counting recv channels correctly, Juan Quintela, 2018/03/07
- [Qemu-devel] [PATCH v10 03/24] migration: Create tcp_port parameter, Juan Quintela, 2018/03/07
- [Qemu-devel] [PATCH v10 07/24] [RFH] tests: Add migration compress threads tests, Juan Quintela, 2018/03/07
- [Qemu-devel] [PATCH v10 06/24] tests: Add basic migration precopy tcp test, Juan Quintela, 2018/03/07
- [Qemu-devel] [PATCH v10 11/24] migration: terminate_* can be called for other threads, Juan Quintela, 2018/03/07
- [Qemu-devel] [PATCH v10 14/24] migration: Be sure all recv channels are created, Juan Quintela, 2018/03/07
- [Qemu-devel] [PATCH v10 01/24] tests: Add migration precopy test, Juan Quintela, 2018/03/07