From: Vladislav Yasevich <vyasevic@redhat.com>
To: qemu-devel@nongnu.org
Cc: Vladislav Yasevich <vyasevic@redhat.com>,
jasowang@redhat.com, stefanha@redhat.com
Subject: [Qemu-devel] [PATCH v4 2/2] rtl8139: Do not consume the packet during overflow in standard mode.
Date: Tue, 1 Sep 2015 11:26:46 -0400 [thread overview]
Message-ID: <1441121206-6997-3-git-send-email-vyasevic@redhat.com> (raw)
In-Reply-To: <1441121206-6997-1-git-send-email-vyasevic@redhat.com>
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>
---
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 8a33466..cb51613 100644
--- a/hw/net/rtl8139.c
+++ b/hw/net/rtl8139.c
@@ -1159,7 +1159,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;
--
1.9.3
next prev parent reply other threads:[~2015-09-01 15:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 15:26 [Qemu-devel] [PATCH v4 0/2] rtl8139: Fix buffer overflow in standard mode Vladislav Yasevich
2015-09-01 15:26 ` [Qemu-devel] [PATCH v4 1/2] rtl8139: Fix receive buffer overflow check Vladislav Yasevich
2015-09-02 3:09 ` Jason Wang
2015-09-01 15:26 ` Vladislav Yasevich [this message]
2015-09-02 3:09 ` [Qemu-devel] [PATCH v4 2/2] rtl8139: Do not consume the packet during overflow in standard mode Jason Wang
2015-09-02 12:42 ` [Qemu-devel] [PATCH v4 0/2] rtl8139: Fix buffer " Stefan Hajnoczi
2015-09-02 12:53 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1441121206-6997-3-git-send-email-vyasevic@redhat.com \
--to=vyasevic@redhat.com \
--cc=jasowang@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).