mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00

Allow the caller to restrict the set of interfaces that announces are sent on. The default is still to send on all interfaces. e.g. { "execute": "announce-self", "arguments": { "initial": 50, "max": 550, "rounds": 5, "step": 50, "interfaces": ["vn2", "vn1"] } } This doesn't affect the behaviour of migraiton announcments. Note: There's still only one timer for the qmp command, so that performing an 'announce-self' on one list of interfaces followed by another 'announce-self' on another list will stop the announces on the existing set. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
40 lines
1 KiB
C
40 lines
1 KiB
C
/*
|
|
* Self-announce facility
|
|
* (c) 2017-2019 Red Hat, Inc.
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*/
|
|
|
|
#ifndef QEMU_NET_ANNOUNCE_H
|
|
#define QEMU_NET_ANNOUNCE_H
|
|
|
|
#include "qapi/qapi-types-net.h"
|
|
#include "qemu/timer.h"
|
|
|
|
struct AnnounceTimer {
|
|
QEMUTimer *tm;
|
|
AnnounceParameters params;
|
|
QEMUClockType type;
|
|
int round;
|
|
};
|
|
|
|
/* Returns: update the timer to the next time point */
|
|
int64_t qemu_announce_timer_step(AnnounceTimer *timer);
|
|
|
|
/* Delete the underlying timer and other data */
|
|
void qemu_announce_timer_del(AnnounceTimer *timer);
|
|
|
|
/*
|
|
* Under BQL/main thread
|
|
* Reset the timer to the given parameters/type/notifier.
|
|
*/
|
|
void qemu_announce_timer_reset(AnnounceTimer *timer,
|
|
AnnounceParameters *params,
|
|
QEMUClockType type,
|
|
QEMUTimerCB *cb,
|
|
void *opaque);
|
|
|
|
void qemu_announce_self(AnnounceTimer *timer, AnnounceParameters *params);
|
|
|
|
#endif
|