From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAyPi-00014O-Hf for qemu-devel@nongnu.org; Fri, 03 Jul 2015 06:41:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAyPf-0007Sx-73 for qemu-devel@nongnu.org; Fri, 03 Jul 2015 06:41:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAyPf-0007St-1M for qemu-devel@nongnu.org; Fri, 03 Jul 2015 06:41:43 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 24F3C923B7 for ; Fri, 3 Jul 2015 10:41:42 +0000 (UTC) Date: Fri, 3 Jul 2015 11:41:38 +0100 From: Stefan Hajnoczi Message-ID: <20150703104138.GA15942@stefanha-thinkpad.redhat.com> References: <1435885721-10434-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HlL+5n6rz5pIUxbD" Content-Disposition: inline In-Reply-To: <1435885721-10434-1-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] ne2000: Drop ne2000_can_receive List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: jasowang@redhat.com, qemu-devel@nongnu.org --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 03, 2015 at 09:08:41AM +0800, Fam Zheng wrote: > This moves the behavior of ne2000_can_receive to ne2000_receive. The > logic is when the NIC is stopped we drop the packet, when the buffer is > full we queue it and try flush later. >=20 > ne2000_buffer_full is determined by s->curpag, s->boundary, s->start and > s->stop. Add a flush in ne2000_ioport_write as they are all updated > there, except the advancing of s->curpag in ne2000_receive where > ne2000_buffer_full is already false. >=20 > Signed-off-by: Fam Zheng > --- > hw/net/ne2000-isa.c | 1 - > hw/net/ne2000.c | 27 ++++++++++++++++----------- > 2 files changed, 16 insertions(+), 12 deletions(-) Thanks, applied to my net tree: https://github.com/stefanha/qemu/commits/net Stefan --HlL+5n6rz5pIUxbD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVlmbiAAoJEJykq7OBq3PIimYIAIZ+zWw63tyIqb0SqgoCx8O8 DpZJSX/pPgPpCOnRwB94fkDzeKVKOxqOIjzB8+dy9lIFj9fUc6u3CNeYyZbuAVuh 4eLeFdDqyEiA5ECbIZV4E3ajQqEMbYc4vziE3zIWOObrZKYKzuaiVsEzlhRzy+ib uWZTHKqnWHULFYHTfYt55ZW1w6weWV8GHrFfNTs1ps60w2ktjAGSCLVH9g/eaHgY aphKxIwKleDm46tjscDro6Brx2TYxL8oFTOVUeyI3j6sRsyBYhb0iPszQ1XK6EXu 3w1wlQCDdBT7qAGp4/W8IPCwopdMeQ48RSiy4EtDGvVZtzV9s9/kubSN+NVHED0= =dp0w -----END PGP SIGNATURE----- --HlL+5n6rz5pIUxbD--