From: Vladislav Yasevich <[email protected]> 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 <[email protected]> Reviewed-by: Jason Wang <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]> --- hw/net/rtl8139.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index 960580b..fb2c55c 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; -- 2.4.3
