aboutsummaryrefslogtreecommitdiff
path: root/net/announce.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2019-02-27 13:24:09 +0000
committerJason Wang <jasowang@redhat.com>2019-03-05 11:27:41 +0800
commit44b416ad62bf1068a9653fe066bd500fb9b0d88f (patch)
treea6da008533ee609514d1e9af03077d2f7cbe38ff /net/announce.c
parent7659505c1680643d13ad7675f9e649d388303059 (diff)
net: Add a network device specific self-announcement ability
Some network devices have a capability to do self announcements (ex: virtio-net). Add infrastructure that would allow devices to expose this ability. Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'net/announce.c')
-rw-r--r--net/announce.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/announce.c b/net/announce.c
index 13ad9c2ba8..070f37a7fa 100644
--- a/net/announce.c
+++ b/net/announce.c
@@ -102,6 +102,11 @@ static void qemu_announce_self_iter(NICState *nic, void *opaque)
len = announce_self_create(buf, nic->conf->macaddr.a);
qemu_send_packet_raw(qemu_get_queue(nic), buf, len);
+
+ /* if the NIC provides it's own announcement support, use it as well */
+ if (nic->ncs->info->announce) {
+ nic->ncs->info->announce(nic->ncs);
+ }
}
static void qemu_announce_self_once(void *opaque)
{