[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #20515] TCP delayed ack does not work as expected
From: |
Kieran Mansley |
Subject: |
[lwip-devel] [bug #20515] TCP delayed ack does not work as expected |
Date: |
Tue, 31 Mar 2009 10:45:56 +0000 |
User-agent: |
Opera/9.21 (X11; Linux i686; U; en) |
Follow-up Comment #26, bug #20515 (project lwip):
OK, the change I've made is as follows. I also spotted I wasn't using the
TCP_SEG_* macros to compare sequence numbers, which was another bug. I've
also updated the patch to incorporate this change and attached it here. Oleg:
could you check that this resolves your issue with the advertised window going
to 65535? If so, I'll check it in so that it can get some wider testing.
diff -r 02a296cfc521 core/tcp.c
--- a/core/tcp.c
+++ b/core/tcp.c
@@ -393,13 +393,19 @@ u32_t tcp_update_rcv_ann_wnd(struct tcp_
{
u32_t new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd;
- if (new_right_edge >= pcb->rcv_ann_right_edge + pcb->mss) {
+ if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + pcb->mss)) {
/* we can advertise more window */
pcb->rcv_ann_wnd = pcb->rcv_wnd;
return new_right_edge - pcb->rcv_ann_right_edge;
} else {
- /* keep the right edge of window constant */
- pcb->rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt;
+ if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) {
+ /* Can happen due to other end sending out of advertised window,
+ * but within actual available (but not yet advertised) window */
+ pcb->rcv_ann_wnd = 0;
+ } else {
+ /* keep the right edge of window constant */
+ pcb->rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt;
+ }
return 0;
}
}
(file #17844)
_______________________________________________________
Additional Item Attachment:
File name: window_updates Size:10 KB
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?20515>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #20515] TCP delayed ack does not work as expected, Kieran Mansley, 2009/03/27
- [lwip-devel] [bug #20515] TCP delayed ack does not work as expected, Kieran Mansley, 2009/03/27
- [lwip-devel] [bug #20515] TCP delayed ack does not work as expected, Simon Goldschmidt, 2009/03/29
- [lwip-devel] [bug #20515] TCP delayed ack does not work as expected, Kieran Mansley, 2009/03/30
- [lwip-devel] [bug #20515] TCP delayed ack does not work as expected, Simon Goldschmidt, 2009/03/30
- [lwip-devel] [bug #20515] TCP delayed ack does not work as expected, Oleg Tyshev, 2009/03/30
- [lwip-devel] [bug #20515] TCP delayed ack does not work as expected, Oleg Tyshev, 2009/03/31
- [lwip-devel] [bug #20515] TCP delayed ack does not work as expected, Kieran Mansley, 2009/03/31
- [lwip-devel] [bug #20515] TCP delayed ack does not work as expected, Kieran Mansley, 2009/03/31
- [lwip-devel] [bug #20515] TCP delayed ack does not work as expected,
Kieran Mansley <=
- [lwip-devel] [bug #20515] TCP delayed ack does not work as expected, Oleg Tyshev, 2009/03/31
- [lwip-devel] [bug #20515] TCP delayed ack does not work as expected, Kieran Mansley, 2009/03/31
- [lwip-devel] [bug #20515] TCP delayed ack does not work as expected, Oleg Tyshev, 2009/03/31
- [lwip-devel] [bug #20515] TCP delayed ack does not work as expected, Kieran Mansley, 2009/03/31