aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2007-08-09 14:33:18 +0300
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:47:55 -0700
commitb5860bbac7be1381626f3dc8a0cb970a60fcefb4 (patch)
tree53034429084f92fdb55c062498e1f4255be9bd4a /include/net
parent[TCP]: Remove num_acked>0 checks from cong.ctrl mods pkts_acked (diff)
downloadlinux-dev-b5860bbac7be1381626f3dc8a0cb970a60fcefb4.tar.xz
linux-dev-b5860bbac7be1381626f3dc8a0cb970a60fcefb4.zip
[TCP]: Tighten tcp_sock's belt, drop left_out
It is easily calculable when needed and user are not that many after all. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/tcp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 9d3438f6b52f..299872d461c7 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -735,7 +735,8 @@ static inline void tcp_ca_event(struct sock *sk, const enum tcp_ca_event event)
*/
static inline unsigned int tcp_packets_in_flight(const struct tcp_sock *tp)
{
- return (tp->packets_out - tp->left_out + tp->retrans_out);
+ return tp->packets_out - (tp->sacked_out + tp->lost_out) +
+ tp->retrans_out;
}
/* If cwnd > ssthresh, we may raise ssthresh to be half-way to cwnd.
@@ -757,7 +758,6 @@ static inline void tcp_sync_left_out(struct tcp_sock *tp)
{
BUG_ON(tp->rx_opt.sack_ok &&
(tp->sacked_out + tp->lost_out > tp->packets_out));
- tp->left_out = tp->sacked_out + tp->lost_out;
}
extern void tcp_enter_cwr(struct sock *sk, const int set_ssthresh);