[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/11] migration: Move self_announce_delay() to
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH 02/11] migration: Move self_announce_delay() to misc.h |
Date: |
Mon, 12 Jun 2017 12:43:12 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 12/06/2017 12:35, Juan Quintela wrote:
> Laurent Vivier <address@hidden> wrote:
>> On 01/06/2017 23:29, Juan Quintela wrote:
>>> Signed-off-by: Juan Quintela <address@hidden>
>>> ---
>>> hw/net/virtio-net.c | 1 +
>>> include/migration/misc.h | 10 ++++++++++
>>> include/migration/vmstate.h | 10 ----------
>>> migration/savevm.c | 1 +
>>> 4 files changed, 12 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
>>> index 9a3d769..91eddaf 100644
>>> --- a/hw/net/virtio-net.c
>>> +++ b/hw/net/virtio-net.c
>>> @@ -25,6 +25,7 @@
>>> #include "qapi/qmp/qjson.h"
>>> #include "qapi-event.h"
>>> #include "hw/virtio/virtio-access.h"
>>> +#include "migration/misc.h"
>>>
>>> #define VIRTIO_NET_VM_VERSION 11
>>>
>>> diff --git a/include/migration/misc.h b/include/migration/misc.h
>>> index d7892b7..60486d4 100644
>>> --- a/include/migration/misc.h
>>> +++ b/include/migration/misc.h
>>> @@ -26,4 +26,14 @@ void blk_mig_init(void);
>>> static inline void blk_mig_init(void) {}
>>> #endif
>>>
>>> +#define SELF_ANNOUNCE_ROUNDS 5
>>> +
>>> +static inline
>>> +int64_t self_announce_delay(int round)
>>> +{
>>> + assert(round < SELF_ANNOUNCE_ROUNDS && round > 0);
>>> + /* delay 50ms, 150ms, 250ms, ... */
>>> + return 50 + (SELF_ANNOUNCE_ROUNDS - round - 1) * 100;
>>> +}
>>> +
>>
>> It seems it is not used in a migration purpose by virtio-net, so it
>> should be moved out of include/migration, perhaps in include/qemu/timer.h ?
>
> There are some series from Vlad that touched this, but I need to move it
> _anyways_ because I move migration.h to be internal to migration/.
>
> I already asked him to move them to net/<anywhere>
>
> Later, Juan.
>
ok, so:
Reviewed-by: Laurent Vivier <address@hidden>
- [Qemu-devel] [PATCH 00/11] Misc migration cleanups, Juan Quintela, 2017/06/01
- [Qemu-devel] [PATCH 03/11] migration: Split registration functions from vmstate.h, Juan Quintela, 2017/06/01
- [Qemu-devel] [PATCH 04/11] migration: Move dump_vmsate_json_to_file() to misc.h, Juan Quintela, 2017/06/01
- [Qemu-devel] [PATCH 05/11] migration: Move constants to savevm.h, Juan Quintela, 2017/06/01
- [Qemu-devel] [PATCH 06/11] migration: Commands are only used inside migration.c, Juan Quintela, 2017/06/01