From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCOO6-0004hR-OU for qemu-devel@nongnu.org; Tue, 07 Jul 2015 04:38:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCOO1-0000oB-6Y for qemu-devel@nongnu.org; Tue, 07 Jul 2015 04:37:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCOO1-0000o0-16 for qemu-devel@nongnu.org; Tue, 07 Jul 2015 04:37:53 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 4FC0836B1A8 for ; Tue, 7 Jul 2015 08:37:52 +0000 (UTC) Date: Tue, 7 Jul 2015 09:37:50 +0100 From: Stefan Hajnoczi Message-ID: <20150707083750.GA25892@stefanha-thinkpad.redhat.com> References: <1436250630-26109-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HcAYCG3uE/tztfnV" Content-Disposition: inline In-Reply-To: <1436250630-26109-1-git-send-email-famz@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 --HcAYCG3uE/tztfnV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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(-) 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. 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(). If you want to get rid of net_hub_flush(), that's great. But please remove the duplicate code. --HcAYCG3uE/tztfnV Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVm4/eAAoJEJykq7OBq3PI1LYH/RHL+dfhx2l6w1n39WbfQRcs LOf0qy9tLCoQMxCeLvhiwSIjuZZEX6PJVeAXBLUqHlTuYdRsLPJvLBjB7IQKboWO 0oUp4YUYIU2l6NV6INI02ArIEuR/TfAwTJ0mOSO5zaI4332nRcyy1TaW36tLcoMp 8vCXnifR57ncT+8s+7tsXztrPvmy31USA7yDSf6yIgh0yMgaswrvOdE68GgGvBZQ MEKCO23T/7Rh+a4ShipkXC6ytWdxD/eG3xpnp5xVQFaeEJz2fX7vTt2mnU2HWvSP CrwBfMjT+v5k190wzvznVl2VlB7yTbI768aHktBsicMclafs1v/mSC0U9bpBbJk= =XXep -----END PGP SIGNATURE----- --HcAYCG3uE/tztfnV--