|
|
9ae3a8 |
From 9318bd2b84409c6f3810d410c6918fefec072408 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Vlad Yasevich <vyasevic@redhat.com>
|
|
|
9ae3a8 |
Date: Wed, 16 Dec 2015 02:58:23 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 6/6] rtl8139: Do not consume the packet during overflow in
|
|
|
9ae3a8 |
standard mode.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Message-id: <1450234703-7606-3-git-send-email-vyasevic@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 68618
|
|
|
9ae3a8 |
O-Subject: [RHEL7.3 qemu-kvm PATCH 2/2] rtl8139: Do not consume the packet during overflow in standard mode.
|
|
|
9ae3a8 |
Bugzilla: 1252757
|
|
|
9ae3a8 |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Xiao Wang <jasowang@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
When operation in standard mode, we currently return the size
|
|
|
9ae3a8 |
of packet during buffer overflow. This consumes the overflow
|
|
|
9ae3a8 |
packet. Return 0 instead so we can re-process the overflow packet
|
|
|
9ae3a8 |
when we have room.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
This fixes issues with lost/dropped fragments of large messages.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
|
|
|
9ae3a8 |
Reviewed-by: Jason Wang <jasowang@redhat.com>
|
|
|
9ae3a8 |
Message-id: 1441121206-6997-3-git-send-email-vyasevic@redhat.com
|
|
|
9ae3a8 |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit 26c4e7ca72d970d120f0f51244bc8d37458512a0)
|
|
|
9ae3a8 |
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/net/rtl8139.c | 2 +-
|
|
|
9ae3a8 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
|
|
|
9ae3a8 |
index 6a167df..aa2503d 100644
|
|
|
9ae3a8 |
--- a/hw/net/rtl8139.c
|
|
|
9ae3a8 |
+++ b/hw/net/rtl8139.c
|
|
|
9ae3a8 |
@@ -1148,7 +1148,7 @@ static ssize_t rtl8139_do_receive(NetClientState *nc, const uint8_t *buf, size_t
|
|
|
9ae3a8 |
s->IntrStatus |= RxOverflow;
|
|
|
9ae3a8 |
++s->RxMissed;
|
|
|
9ae3a8 |
rtl8139_update_irq(s);
|
|
|
9ae3a8 |
- return size_;
|
|
|
9ae3a8 |
+ return 0;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
packet_header |= RxStatusOK;
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.8.3.1
|
|
|
9ae3a8 |
|