[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #51154] ABC (Appropriate Byte Counting) fails to work
From: |
Joel Cunningham |
Subject: |
[lwip-devel] [bug #51154] ABC (Appropriate Byte Counting) fails to work with TCP_WND set to maximum. |
Date: |
Thu, 1 Jun 2017 13:44:12 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0 |
Follow-up Comment #6, bug #51154 (project lwip):
I was able to reproduce the issue, there is integer promotion happening in the
inequality that checks for rollover, meaning the check doesn't work.
Tim ran into the rollover because cwnd is 1080, which is smaller than the next
segment (guessing based on 1460 SMSS), so sending stalls
if (pcb->cwnd + increase > pcb->cwnd) {
pcb->cwnd += increase;
}
This was evaluating to TRUE even though all variables are of type
tcpwnd_size_t, then rollover was occurring for pcb->cwnd += increase;
The previous code did the following:
if ((tcpwnd_size_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) {
pcb->cwnd += pcb->mss;
And the cast causes the rollover before the inequality comparison (done as an
int I believe due to integer promotion rules)
I have attached a patch that introduces a new macro, TCP_WND_INC that uses the
correct cast, but also sets the window to maximum value if it were to
rollover. This should ensure we can fully utilize the tcpwnd_size_t number
space for cwnd. Before, once the increment would cause a rollover, we
wouldn't increment cwnd to the full value
Tim,
Can you try my patch?
(file #40837)
_______________________________________________________
Additional Item Attachment:
File name: 0001-tcp-fix-cwnd-rollover-introduced-by-ABC.patch Size:3 KB
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?51154>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #51154] ABC (Appropriate Byte Counting) fails to work with TCP_WND set to maximum., Tim Cussins, 2017/06/01
- [lwip-devel] [bug #51154] ABC (Appropriate Byte Counting) fails to work with TCP_WND set to maximum., Tim Cussins, 2017/06/01
- [lwip-devel] [bug #51154] ABC (Appropriate Byte Counting) fails to work with TCP_WND set to maximum., Joel Cunningham, 2017/06/01
- [lwip-devel] [bug #51154] ABC (Appropriate Byte Counting) fails to work with TCP_WND set to maximum., Joel Cunningham, 2017/06/01
- [lwip-devel] [bug #51154] ABC (Appropriate Byte Counting) fails to work with TCP_WND set to maximum., Tim Cussins, 2017/06/01
- [lwip-devel] [bug #51154] ABC (Appropriate Byte Counting) fails to work with TCP_WND set to maximum., Simon Goldschmidt, 2017/06/01
- [lwip-devel] [bug #51154] ABC (Appropriate Byte Counting) fails to work with TCP_WND set to maximum.,
Joel Cunningham <=
- [lwip-devel] [bug #51154] ABC (Appropriate Byte Counting) fails to work with TCP_WND set to maximum., Simon Goldschmidt, 2017/06/01
- [lwip-devel] [bug #51154] ABC (Appropriate Byte Counting) fails to work with TCP_WND set to maximum., Joel Cunningham, 2017/06/01
- [lwip-devel] [bug #51154] ABC (Appropriate Byte Counting) fails to work with TCP_WND set to maximum., Tim Cussins, 2017/06/02
- [lwip-devel] [bug #51154] ABC (Appropriate Byte Counting) fails to work with TCP_WND set to maximum., Simon Goldschmidt, 2017/06/02
- [lwip-devel] [bug #51154] ABC (Appropriate Byte Counting) fails to work with TCP_WND set to maximum., Simon Goldschmidt, 2017/06/02
- [lwip-devel] [bug #51154] ABC (Appropriate Byte Counting) fails to work with TCP_WND set to maximum., Joel Cunningham, 2017/06/02
- [lwip-devel] [bug #51154] ABC (Appropriate Byte Counting) fails to work with TCP_WND set to maximum., Simon Goldschmidt, 2017/06/14