mirror of https://github.com/xemu-project/xemu.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 <vyasevic@redhat.com> Reviewed-by: Jason Wang <jasowang@redhat.com> Message-id: 1441121206-6997-3-git-send-email-vyasevic@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
fabdcd3392
commit
26c4e7ca72
|
@ -1157,7 +1157,7 @@ static ssize_t rtl8139_do_receive(NetClientState *nc, const uint8_t *buf, size_t
|
||||||
s->IntrStatus |= RxOverflow;
|
s->IntrStatus |= RxOverflow;
|
||||||
++s->RxMissed;
|
++s->RxMissed;
|
||||||
rtl8139_update_irq(s);
|
rtl8139_update_irq(s);
|
||||||
return size_;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
packet_header |= RxStatusOK;
|
packet_header |= RxStatusOK;
|
||||||
|
|
Loading…
Reference in New Issue