aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2008-12-06 01:43:56 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-06 01:43:56 -0500
commit726e07a8a38168266ac95d87736f9501a2d9e7b2 (patch)
tree40c351cce9c00c250386e43cce6e4ebfb5091ea2 /net/ipv4/tcp_output.c
parent41834b7332a1ad3f7b6e8bbd83e6ce63586f0b07 (diff)
tcp: move some parts from tcp_write_xmit
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.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 76f840917bcb..80147ba44141 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1530,13 +1530,6 @@ static int tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle)
1530 int cwnd_quota; 1530 int cwnd_quota;
1531 int result; 1531 int result;
1532 1532
1533 /* If we are closed, the bytes will have to remain here.
1534 * In time closedown will finish, we empty the write queue and all
1535 * will be happy.
1536 */
1537 if (unlikely(sk->sk_state == TCP_CLOSE))
1538 return 0;
1539
1540 sent_pkts = 0; 1533 sent_pkts = 0;
1541 1534
1542 /* Do MTU probing. */ 1535 /* Do MTU probing. */
@@ -1608,10 +1601,18 @@ void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss,
1608{ 1601{
1609 struct sk_buff *skb = tcp_send_head(sk); 1602 struct sk_buff *skb = tcp_send_head(sk);
1610 1603
1611 if (skb) { 1604 if (!skb)
1612 if (tcp_write_xmit(sk, cur_mss, nonagle)) 1605 return;
1613 tcp_check_probe_timer(sk); 1606
1614 } 1607 /* If we are closed, the bytes will have to remain here.
1608 * In time closedown will finish, we empty the write queue and
1609 * all will be happy.
1610 */
1611 if (unlikely(sk->sk_state == TCP_CLOSE))
1612 return;
1613
1614 if (tcp_write_xmit(sk, cur_mss, nonagle))
1615 tcp_check_probe_timer(sk);
1615} 1616}
1616 1617
1617/* Send _single_ skb sitting at the send head. This function requires 1618/* Send _single_ skb sitting at the send head. This function requires