From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAeko-0003qB-Td for qemu-devel@nongnu.org; Thu, 02 Jul 2015 09:42:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAekk-0004J7-Tu for qemu-devel@nongnu.org; Thu, 02 Jul 2015 09:42:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAekk-0004J3-OU for qemu-devel@nongnu.org; Thu, 02 Jul 2015 09:42:10 -0400 Date: Thu, 2 Jul 2015 14:13:28 +0100 From: Stefan Hajnoczi Message-ID: <20150702131328.GH21214@stefanha-thinkpad.home> References: <1435739014-23610-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/9ZOS6odDaRI+0hI" Content-Disposition: inline In-Reply-To: <1435739014-23610-1-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH] net: Flush queued packets when guest resumes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Jason Wang , qemu-devel@nongnu.org, chao.zhou@intel.com --/9ZOS6odDaRI+0hI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 01, 2015 at 04:23:34PM +0800, Fam Zheng wrote: > Since commit 6e99c63 "net/socket: Drop net_socket_can_send" and friends, > net queues need to be explicitly flushed after qemu_can_send_packet() > returns false, because the netdev side will disable the polling of fd. >=20 > This fixes the case of "cont" after "stop" (or migration), i.e. > vm_running changes to true, by listening to vm state changes. >=20 > Signed-off-by: Fam Zheng > --- > include/net/net.h | 2 ++ > net/net.c | 14 +++++++++++++- > 2 files changed, 15 insertions(+), 1 deletion(-) Please unify this code with: commit ca77d85e1dbf929ae677a0bac96e9b3edd1704da Author: Michael S. Tsirkin Date: Thu Sep 4 11:39:13 2014 +0300 net: complete all queued packets on VM stop --/9ZOS6odDaRI+0hI Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVlTj4AAoJEJykq7OBq3PIhn4H/RVON1wNdxjXyeuuEMQuzlhz Fpy1RUe6uUZ1JjH7HVAhqHiUqEOHlXmKGiohjdc/l2bQdtENCDI/iW46d2sQqlHy mI7PEZPe6U/vVhDoLyBItYpYitQQdcGu2kYasi7d1UqX16DPEYG1Ou+YYrTTD2R8 0Nlp8cfn4HH5RplnjlAfWVdCIlwe89SyE1Fi2vqDzKL4nT0KaTsUj/LygZbN/qxm b8Lk7gRAPYagclG4zJ1d7HCdFSzevU4F4tT2Vk8KrZV7PCMPthsXywUSngBybUUI RGgdHO6esWhFeJiJzaL9tI/O1jEwGbNfs2BOSl9TOaMVyZN/aOodHRnQ6bi8FrE= =qTGM -----END PGP SIGNATURE----- --/9ZOS6odDaRI+0hI--