Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4135
b: refs/heads/master
c: 92df7b5
h: refs/heads/master
i:
  4133: 243f5a0
  4131: 16cdcaa
  4127: 2e78df5
v: v3
  • Loading branch information
David S. Miller committed Jul 5, 2005
1 parent e6aeab7 commit 6d211f8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a762a9800752f05fa8768bb0ac35d0e7f1bcfe7f
refs/heads/master: 92df7b518dcb113de8bc2494e3cd275ad887f12b
68 changes: 34 additions & 34 deletions trunk/net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,54 +842,54 @@ static inline void tcp_cwnd_validate(struct sock *sk, struct tcp_sock *tp)
static int tcp_write_xmit(struct sock *sk, int nonagle)
{
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *skb;
unsigned int mss_now;
int sent_pkts;

/* If we are closed, the bytes will have to remain here.
* In time closedown will finish, we empty the write queue and all
* will be happy.
*/
if (sk->sk_state != TCP_CLOSE) {
struct sk_buff *skb;
int sent_pkts = 0;
if (unlikely(sk->sk_state == TCP_CLOSE))
return 0;

/* Account for SACKS, we may need to fragment due to this.
* It is just like the real MSS changing on us midstream.
* We also handle things correctly when the user adds some
* IP options mid-stream. Silly to do, but cover it.
*/
mss_now = tcp_current_mss(sk, 1);

while ((skb = sk->sk_send_head) &&
tcp_snd_test(sk, skb, mss_now,
tcp_skb_is_last(sk, skb) ? nonagle :
TCP_NAGLE_PUSH)) {
if (skb->len > mss_now) {
if (tcp_fragment(sk, skb, mss_now))
break;
}

TCP_SKB_CB(skb)->when = tcp_time_stamp;
tcp_tso_set_push(skb);
if (tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC)))
/* Account for SACKS, we may need to fragment due to this.
* It is just like the real MSS changing on us midstream.
* We also handle things correctly when the user adds some
* IP options mid-stream. Silly to do, but cover it.
*/
mss_now = tcp_current_mss(sk, 1);
sent_pkts = 0;
while ((skb = sk->sk_send_head) &&
tcp_snd_test(sk, skb, mss_now,
tcp_skb_is_last(sk, skb) ? nonagle :
TCP_NAGLE_PUSH)) {
if (skb->len > mss_now) {
if (tcp_fragment(sk, skb, mss_now))
break;
}

/* Advance the send_head. This one is sent out.
* This call will increment packets_out.
*/
update_send_head(sk, tp, skb);
TCP_SKB_CB(skb)->when = tcp_time_stamp;
tcp_tso_set_push(skb);
if (tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC)))
break;

tcp_minshall_update(tp, mss_now, skb);
sent_pkts = 1;
}
/* Advance the send_head. This one is sent out.
* This call will increment packets_out.
*/
update_send_head(sk, tp, skb);

if (sent_pkts) {
tcp_cwnd_validate(sk, tp);
return 0;
}
tcp_minshall_update(tp, mss_now, skb);
sent_pkts = 1;
}

return !tp->packets_out && sk->sk_send_head;
if (sent_pkts) {
tcp_cwnd_validate(sk, tp);
return 0;
}
return 0;

return !tp->packets_out && sk->sk_send_head;
}

/* Push out any pending frames which were held back due to
Expand Down

0 comments on commit 6d211f8

Please sign in to comment.