xen nic: check tx queue after connect.
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 11 Jun 2009 09:32:51 +0000 (11:32 +0200)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 13 Jun 2009 13:18:59 +0000 (16:18 +0300)
Needed for savevm/loadvm + migration: In that case the queue might
already have packets on (re-)connect.  The guest wouldn't notify us
because notifications are only sent when stuffing a packet into an
empty queue.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/xen_nic.c

index 9a3c870..e4f71f7 100644 (file)
@@ -356,6 +356,8 @@ static int net_connect(struct XenDevice *xendev)
                  "remote port %d, local port %d\n",
                  netdev->tx_ring_ref, netdev->rx_ring_ref,
                  netdev->xendev.remote_port, netdev->xendev.local_port);
+
+    net_tx_packets(netdev);
     return 0;
 }