From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK1kx-0006sD-Hk for qemu-devel@nongnu.org; Tue, 28 Jul 2015 06:05:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZK1kv-0008Co-IR for qemu-devel@nongnu.org; Tue, 28 Jul 2015 06:05:07 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:31732) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK1kv-0008Ao-DW for qemu-devel@nongnu.org; Tue, 28 Jul 2015 06:05:05 -0400 From: Leon Alrae Date: Tue, 28 Jul 2015 11:04:47 +0100 Message-ID: <1438077888-10384-5-git-send-email-leon.alrae@imgtec.com> In-Reply-To: <1438077888-10384-1-git-send-email-leon.alrae@imgtec.com> References: <1438077888-10384-1-git-send-email-leon.alrae@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 4/5] net/dp8393x: remove check of runt packets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Herv=C3=A9=20Poussineau?= From: Herv=C3=A9 Poussineau Ethernet requires that messages are at least 64 bytes on the wire. This limitation does not exist on emulation (no wire message), so remove the check. Netcard is now able to receive small network packets. Signed-off-by: Herv=C3=A9 Poussineau Reviewed-by: Aurelien Jarno Signed-off-by: Leon Alrae --- hw/net/dp8393x.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c index 93d6a47..0f45146 100644 --- a/hw/net/dp8393x.c +++ b/hw/net/dp8393x.c @@ -643,11 +643,6 @@ static int dp8393x_receive_filter(dp8393xState *s, c= onst uint8_t * buf, static const uint8_t bcast[] =3D {0xff, 0xff, 0xff, 0xff, 0xff, 0xff= }; int i; =20 - /* Check for runt packet (remember that checksum is not there) */ - if (size < 64 - 4) { - return (s->regs[SONIC_RCR] & SONIC_RCR_RNT) ? 0 : -1; - } - /* Check promiscuous mode */ if ((s->regs[SONIC_RCR] & SONIC_RCR_PRO) && (buf[0] & 1) =3D=3D 0) { return 0; --=20 2.1.0