From: Vladislav Yasevich Date: Tue, 1 Sep 2015 15:26:46 +0000 (-0400) Subject: rtl8139: Do not consume the packet during overflow in standard mode. X-Git-Tag: v2.5.0-rc0~160^2~2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=26c4e7ca72d970d120f0f51244bc8d37458512a0;p=qemu-xen-unstable.git rtl8139: Do not consume the packet during overflow in standard mode. When operation in standard mode, we currently return the size of packet during buffer overflow. This consumes the overflow packet. Return 0 instead so we can re-process the overflow packet when we have room. This fixes issues with lost/dropped fragments of large messages. Signed-off-by: Vladislav Yasevich Reviewed-by: Jason Wang Message-id: 1441121206-6997-3-git-send-email-vyasevic@redhat.com Signed-off-by: Stefan Hajnoczi --- diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index 960580b910..fb2c55ce0b 100644 --- a/hw/net/rtl8139.c +++ b/hw/net/rtl8139.c @@ -1157,7 +1157,7 @@ static ssize_t rtl8139_do_receive(NetClientState *nc, const uint8_t *buf, size_t s->IntrStatus |= RxOverflow; ++s->RxMissed; rtl8139_update_irq(s); - return size_; + return 0; } packet_header |= RxStatusOK;