From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHEXJ-0000n2-Nn for qemu-devel@nongnu.org; Mon, 20 Jul 2015 13:07:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZHEXF-0002CI-Mw for qemu-devel@nongnu.org; Mon, 20 Jul 2015 13:07:29 -0400 Received: from mail-wg0-x22a.google.com ([2a00:1450:400c:c00::22a]:34292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHEXF-0002C9-Fb for qemu-devel@nongnu.org; Mon, 20 Jul 2015 13:07:25 -0400 Received: by wgkl9 with SMTP id l9so135550059wgk.1 for ; Mon, 20 Jul 2015 10:07:24 -0700 (PDT) Date: Mon, 20 Jul 2015 18:07:20 +0100 From: Stefan Hajnoczi Message-ID: <20150720170720.GB3607@stefanha-thinkpad.redhat.com> References: <1436250630-26109-1-git-send-email-famz@redhat.com> <20150707083750.GA25892@stefanha-thinkpad.redhat.com> <20150707094156.GD28682@ad.nay.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hQiwHBbRI9kgIhsi" Content-Disposition: inline In-Reply-To: <20150707094156.GD28682@ad.nay.redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] net-hub: Drop can_receive List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Jason Wang , qemu-devel@nongnu.org, Stefan Hajnoczi --hQiwHBbRI9kgIhsi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 07, 2015 at 05:41:56PM +0800, Fam Zheng wrote: > On Tue, 07/07 09:37, Stefan Hajnoczi wrote: > > On Tue, Jul 07, 2015 at 02:30:30PM +0800, Fam Zheng wrote: > > > This moves the semantics from net_hub_port_can_receive to receive > > > functions, by returning 0 if all receiving ports return 0. Also, > > > remember to flush the source port's queue in that case. > > >=20 > > > Signed-off-by: Fam Zheng > > > --- > > > net/hub.c | 54 +++++++++++++++++++++++++++++------------------------- > > > 1 file changed, 29 insertions(+), 25 deletions(-) > >=20 > > This patch revision doesn't take into account the special case code in > > qemu_flush_or_purge_queued_packets(), which I mentioned in my reply to > > the previous revision of this patch. > >=20 > > The queue is now flushed twice because you've introduced > > net_hub_port_send_cb() but qemu_flush_or_purge_queued_packets() already > > calls net_hub_flush(). > >=20 > > If you want to get rid of net_hub_flush(), that's great. But please > > remove the duplicate code. >=20 > Right, I missed that. I'll remove the duplicate and send again. Ping? --hQiwHBbRI9kgIhsi Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVrSrIAAoJEJykq7OBq3PI8d4H/1W8aJ58lYGEm1x+CqY7mL3U 3kriDr3SDD38sxXtZHmiVVYUUARYs5tQ0bNB9kIl5Jjew+p0SsnCumG0RDqmTAft 1udH+G4VeVvan08Krd36GHjajNZVJkU1DtwoLrdviLiDfoGiFrri2V3FW2KE1TIu qcrwZNZ9BXeBqjPJl4rv8LWsjhuvsX467TO+hB4GiDHNMIsRz9+7E4JlXMzSpj2z kJwWJwkZorxLazXYEz2WX6RFvm8m0cc8FRGQaKN2EiH9KZNW+oCdJ7P8hKk82l2X J+sahDorI7wpVi4HNY2aCOQsoSHPXmWquzBpyHxoPwHCKemVUFyiLA2xOuEuHf4= =4I9A -----END PGP SIGNATURE----- --hQiwHBbRI9kgIhsi--