[TCP] FRTO: Use of existing funcs make code more obvious & robust
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Wed, 5 Dec 2007 10:20:21 +0000 (02:20 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 5 Dec 2007 13:37:29 +0000 (05:37 -0800)
commit3e6f049e0c4cf0606207c1a210abf50b436e9adf
tree1001162134823ffb936b0db5baf3b19a419a2e7e
parent92b05e13f16a41405c4f6c953c47b6c4bcf82d30
[TCP] FRTO: Use of existing funcs make code more obvious & robust

Though there's little need for everything that tcp_may_send_now
does (actually, even the state had to be adjusted to pass some
checks FRTO does not want to occur), it's more robust to let it
make the decision if sending is allowed. State adjustments
needed:
- Make sure snd_cwnd limit is not hit in there
- Disable nagle (if necessary) through the frto_counter == 2

The result of check for frto_counter in argument to call for
tcp_enter_frto_loss can just be open coded, therefore there
isn't need to store the previous frto_counter past
tcp_may_send_now.

In addition, returns can then be combined.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c