[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for 2.4 3/3] net/dp8393x: remove check of runt p
From: |
Aurelien Jarno |
Subject: |
Re: [Qemu-devel] [PATCH for 2.4 3/3] net/dp8393x: remove check of runt packets |
Date: |
Sun, 26 Jul 2015 22:14:03 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On 2015-07-24 20:42, Hervé Poussineau wrote:
> 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é Poussineau <address@hidden>
> ---
> hw/net/dp8393x.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
> index 55168b5..d4f811d 100644
> --- a/hw/net/dp8393x.c
> +++ b/hw/net/dp8393x.c
> @@ -645,11 +645,6 @@ static int dp8393x_receive_filter(dp8393xState *s, const
> uint8_t * buf,
> static const uint8_t bcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
> int i;
>
> - /* 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) == 0) {
> return 0;
Reviewed-by: Aurelien Jarno <address@hidden>
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
address@hidden http://www.aurel32.net