Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4136
b: refs/heads/master
c: a2e2a59
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jul 5, 2005
1 parent 6d211f8 commit 49a5e60
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 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: 92df7b518dcb113de8bc2494e3cd275ad887f12b
refs/heads/master: a2e2a59c93cc8ba39caa9011c2573f429e40ccd9
2 changes: 1 addition & 1 deletion trunk/include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ extern __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb,

extern void __tcp_data_snd_check(struct sock *sk, struct sk_buff *skb);
extern void __tcp_push_pending_frames(struct sock *sk, struct tcp_sock *tp,
unsigned cur_mss, int nonagle);
unsigned int cur_mss, int nonagle);
extern int tcp_may_send_now(struct sock *sk, struct tcp_sock *tp);
extern int tcp_retransmit_skb(struct sock *, struct sk_buff *);
extern void tcp_xmit_retransmit_queue(struct sock *);
Expand Down
16 changes: 4 additions & 12 deletions trunk/net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,11 +839,10 @@ static inline void tcp_cwnd_validate(struct sock *sk, struct tcp_sock *tp)
* Returns 1, if no segments are in flight and we have queued segments, but
* cannot send anything now because of SWS or another problem.
*/
static int tcp_write_xmit(struct sock *sk, int nonagle)
static int tcp_write_xmit(struct sock *sk, unsigned int mss_now, 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.
Expand All @@ -853,13 +852,6 @@ static int tcp_write_xmit(struct sock *sk, int nonagle)
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);
sent_pkts = 0;
while ((skb = sk->sk_send_head) &&
tcp_snd_test(sk, skb, mss_now,
Expand Down Expand Up @@ -897,15 +889,15 @@ static int tcp_write_xmit(struct sock *sk, int nonagle)
* The socket must be locked by the caller.
*/
void __tcp_push_pending_frames(struct sock *sk, struct tcp_sock *tp,
unsigned cur_mss, int nonagle)
unsigned int cur_mss, int nonagle)
{
struct sk_buff *skb = sk->sk_send_head;

if (skb) {
if (!tcp_skb_is_last(sk, skb))
nonagle = TCP_NAGLE_PUSH;
if (!tcp_snd_test(sk, skb, cur_mss, nonagle) ||
tcp_write_xmit(sk, nonagle))
tcp_write_xmit(sk, cur_mss, nonagle))
tcp_check_probe_timer(sk, tp);
}
}
Expand All @@ -916,7 +908,7 @@ void __tcp_data_snd_check(struct sock *sk, struct sk_buff *skb)

if (after(TCP_SKB_CB(skb)->end_seq, tp->snd_una + tp->snd_wnd) ||
tcp_packets_in_flight(tp) >= tp->snd_cwnd ||
tcp_write_xmit(sk, tp->nonagle))
tcp_write_xmit(sk, tcp_current_mss(sk, 1), tp->nonagle))
tcp_check_probe_timer(sk, tp);
}

Expand Down

0 comments on commit 49a5e60

Please sign in to comment.