lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] Re: [bug #27445] PCB hangs in Fast Retransmit due to unchan


From: address@hidden
Subject: [lwip-devel] Re: [bug #27445] PCB hangs in Fast Retransmit due to unchanging cwnd
Date: Sat, 24 Oct 2009 13:41:29 +0200
User-agent: Thunderbird 2.0.0.23 (Macintosh/20090812)

Bill Auerbach wrote:

Follow-up Comment #8, bug #27445 (project lwip):

Then you want:

if ((u16_t)(pcb->cwnd + pcb->mss) < pcb->cwnd) { ... }

If you add something to cwnd and it became less than the original cwnd, then
it overflowed, right?
The code wants to do something if it *doesn't* overflow:

/* Inflate the congestion window, but not if it means that
  the value overflows. */
if ((u16_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) {
 pcb->cwnd += pcb->mss;
}

The initial point that I was trying to show is that the cast is meaningless
and doesn't add anything.
That's true, although that piece of code didn't get changed by what Kieran suggested - it's been in there for some time. Still, the cast can be removed, of course.

Simon






reply via email to

[Prev in Thread] Current Thread [Next in Thread]