From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZD85a-0002t5-Mz for qemu-devel@nongnu.org; Thu, 09 Jul 2015 05:25:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZD85W-00027d-Di for qemu-devel@nongnu.org; Thu, 09 Jul 2015 05:25:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40726) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZD85W-00027O-0m for qemu-devel@nongnu.org; Thu, 09 Jul 2015 05:25:50 -0400 Date: Thu, 9 Jul 2015 10:25:46 +0100 From: Stefan Hajnoczi Message-ID: <20150709092546.GF17340@stefanha-thinkpad.redhat.com> References: <1436232067-29144-1-git-send-email-famz@redhat.com> <20150707111103-mutt-send-email-mst@redhat.com> <559B94B5.1030200@redhat.com> <20150707120807-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aPdhxNJGSeOG9wFI" Content-Disposition: inline In-Reply-To: <20150707120807-mutt-send-email-mst@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] net: Flush queued packets when guest resumes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: jcmvbkbc@gmail.com, Jason Wang , Fam Zheng , qemu-devel@nongnu.org --aPdhxNJGSeOG9wFI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 07, 2015 at 12:10:15PM +0300, Michael S. Tsirkin wrote: > On Tue, Jul 07, 2015 at 04:58:29PM +0800, Jason Wang wrote: > >=20 > >=20 > > On 07/07/2015 04:13 PM, Michael S. Tsirkin wrote: > > > On Tue, Jul 07, 2015 at 09:21:07AM +0800, Fam Zheng wrote: > > >> Since commit 6e99c63 "net/socket: Drop net_socket_can_send" and frie= nds, > > >> net queues need to be explicitly flushed after qemu_can_send_packet() > > >> returns false, because the netdev side will disable the polling of f= d. > > >> > > >> This fixes the case of "cont" after "stop" (or migration). > > >> > > >> Signed-off-by: Fam Zheng > > > Note virtio has its own handler which must be used to > > > flush packets - this one might run too early or too late. > >=20 > > If runs too realy (DRIVER_OK is not set), then: packet will be dropped > > (if this patch is used with "drop virtio_net_can_receive()", or the > > queue will be purged since qemu_can_send_packet() returns false. If too > > late, at least tap read poll will be enabled. So still looks ok? >=20 > It's still not helpful for virtio. So which cards are fixed? >=20 > I just find the comment > This fixes the case of "cont" after "stop" (or migration) > too vague. > Can you please include the info about what's broken in the commit log? Max Fillipov reported that it's needed to fix the gdb stub: https://lists.gnu.org/archive/html/qemu-devel/2015-07/msg01015.html --aPdhxNJGSeOG9wFI Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVnj4aAAoJEJykq7OBq3PIPSMH/0M4Lbr5cXAC91FfF7H/Spij fGpAV6jGayZotrMnpHUp8hHbAV9E5kpYhrScqnoFG5ry2I/WKppEz5G9o84XP1rc KTDwUal1/DpMWsLeaI5TX+oEnQWUEjziiRHsco/4ZWEnqmSDLoLiqY9dCsafXnKY lyLIdNbXk9YJ1Jog06YioprhhI/X2j1u/aaqo8bI8P/0E1U3118cGEoa2kNHJDrA /yW2oO+lCfb0Bih1PHd5mQ5nocKAhuJP5WH/CdExZa7xhWRo0i/yOmKHU2ijNKxk JpHe/pDcqI2uCm7b3+6ePtCV54n5KxKWfPdkcbfuhtWDIOIQPL/VrZL9R/fhdac= =sWhj -----END PGP SIGNATURE----- --aPdhxNJGSeOG9wFI--