aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2007-08-09 07:33:18 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:47:55 -0400
commitb5860bbac7be1381626f3dc8a0cb970a60fcefb4 (patch)
tree53034429084f92fdb55c062498e1f4255be9bd4a /net/ipv4/tcp_output.c
parent35e8694198ba94b62df8aa35fa6e52a1cfb86df2 (diff)
[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 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 3c8c8e7f6f6d..7434944caa8f 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -732,10 +732,8 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
732 if (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_RETRANS) 732 if (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_RETRANS)
733 tp->retrans_out -= diff; 733 tp->retrans_out -= diff;
734 734
735 if (TCP_SKB_CB(skb)->sacked & TCPCB_LOST) { 735 if (TCP_SKB_CB(skb)->sacked & TCPCB_LOST)
736 tp->lost_out -= diff; 736 tp->lost_out -= diff;
737 tp->left_out -= diff;
738 }
739 737
740 if (diff > 0) { 738 if (diff > 0) {
741 /* Adjust Reno SACK estimate. */ 739 /* Adjust Reno SACK estimate. */
@@ -1727,15 +1725,11 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb, int m
1727 TCP_SKB_CB(skb)->sacked |= TCP_SKB_CB(next_skb)->sacked&(TCPCB_EVER_RETRANS|TCPCB_AT_TAIL); 1725 TCP_SKB_CB(skb)->sacked |= TCP_SKB_CB(next_skb)->sacked&(TCPCB_EVER_RETRANS|TCPCB_AT_TAIL);
1728 if (TCP_SKB_CB(next_skb)->sacked&TCPCB_SACKED_RETRANS) 1726 if (TCP_SKB_CB(next_skb)->sacked&TCPCB_SACKED_RETRANS)
1729 tp->retrans_out -= tcp_skb_pcount(next_skb); 1727 tp->retrans_out -= tcp_skb_pcount(next_skb);
1730 if (TCP_SKB_CB(next_skb)->sacked&TCPCB_LOST) { 1728 if (TCP_SKB_CB(next_skb)->sacked&TCPCB_LOST)
1731 tp->lost_out -= tcp_skb_pcount(next_skb); 1729 tp->lost_out -= tcp_skb_pcount(next_skb);
1732 tp->left_out -= tcp_skb_pcount(next_skb);
1733 }
1734 /* Reno case is special. Sigh... */ 1730 /* Reno case is special. Sigh... */
1735 if (!tp->rx_opt.sack_ok && tp->sacked_out) { 1731 if (!tp->rx_opt.sack_ok && tp->sacked_out)
1736 tcp_dec_pcount_approx(&tp->sacked_out, next_skb); 1732 tcp_dec_pcount_approx(&tp->sacked_out, next_skb);
1737 tp->left_out -= tcp_skb_pcount(next_skb);
1738 }
1739 1733
1740 /* Not quite right: it can be > snd.fack, but 1734 /* Not quite right: it can be > snd.fack, but
1741 * it is better to underestimate fackets. 1735 * it is better to underestimate fackets.