From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzjz2-00075D-98 for qemu-devel@nongnu.org; Tue, 02 Jun 2015 07:03:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yzjz1-0004ur-7D for qemu-devel@nongnu.org; Tue, 02 Jun 2015 07:03:48 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:101::1]:59804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzjz1-0004u7-1j for qemu-devel@nongnu.org; Tue, 02 Jun 2015 07:03:47 -0400 Date: Tue, 2 Jun 2015 13:03:46 +0200 From: Aurelien Jarno Message-ID: <20150602110346.GH26298@aurel32.net> References: <1432729200-5322-1-git-send-email-hpoussin@reactos.org> <1432729200-5322-9-git-send-email-hpoussin@reactos.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <1432729200-5322-9-git-send-email-hpoussin@reactos.org> Sender: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH v2 08/17] net/dp8393x: always calculate proper checksums List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-15?Q?Herv=E9?= Poussineau Cc: Leon Alrae , qemu-devel@nongnu.org On 2015-05-27 14:19, Herv=E9 Poussineau wrote: > Signed-off-by: Herv=E9 Poussineau > --- > hw/net/dp8393x.c | 12 +----------- > 1 file changed, 1 insertion(+), 11 deletions(-) >=20 > diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c > index 2297231..093f0cc 100644 > --- a/hw/net/dp8393x.c > +++ b/hw/net/dp8393x.c > @@ -21,16 +21,10 @@ > #include "qemu/timer.h" > #include "net/net.h" > #include "hw/mips/mips.h" > +#include > =20 > //#define DEBUG_SONIC > =20 > -/* Calculate CRCs properly on Rx packets */ > -#define SONIC_CALCULATE_RXCRC > - > -#if defined(SONIC_CALCULATE_RXCRC) > -/* For crc32 */ > -#include > -#endif > =20 > #ifdef DEBUG_SONIC > #define DPRINTF(fmt, ...) \ > @@ -764,11 +758,7 @@ static ssize_t nic_receive(NetClientState *nc, const= uint8_t * buf, size_t size) > s->regs[SONIC_TRBA0] =3D s->regs[SONIC_CRBA0]; > =20 > /* Calculate the ethernet checksum */ > -#ifdef SONIC_CALCULATE_RXCRC > checksum =3D cpu_to_le32(crc32(0, buf, rx_len)); > -#else > - checksum =3D 0; > -#endif > =20 > /* Put packet into RBA */ > DPRINTF("Receive packet at %08x\n", (s->regs[SONIC_CRBA1] << 16) | s= ->regs[SONIC_CRBA0]); Reviewed-by: Aurelien Jarno --=20 Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net