Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278267
b: refs/heads/master
c: 6b5a5c0
h: refs/heads/master
i:
  278265: bf898a1
  278263: 77feafc
v: v3
  • Loading branch information
Neal Cardwell authored and David S. Miller committed Nov 29, 2011
1 parent 9f2963c commit 4a89983
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 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: befc93fe76177b3b6ee1e3351b58293866f43aa6
refs/heads/master: 6b5a5c0dbb11dcff4e1b0f1ef87a723197948ed4
8 changes: 8 additions & 0 deletions trunk/include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,14 @@ static inline __u32 tcp_current_ssthresh(const struct sock *sk)
extern void tcp_enter_cwr(struct sock *sk, const int set_ssthresh);
extern __u32 tcp_init_cwnd(const struct tcp_sock *tp, const struct dst_entry *dst);

/* The maximum number of MSS of available cwnd for which TSO defers
* sending if not using sysctl_tcp_tso_win_divisor.
*/
static inline __u32 tcp_max_tso_deferred_mss(const struct tcp_sock *tp)
{
return 3;
}

/* Slow start with delack produces 3 packets of burst, so that
* it is safe "de facto". This will be the default - same as
* the default reordering threshold - but if reordering increases,
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/tcp_cong.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ int tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight)
left * sysctl_tcp_tso_win_divisor < tp->snd_cwnd &&
left * tp->mss_cache < sk->sk_gso_max_size)
return 1;
return left <= tcp_max_burst(tp);
return left <= tcp_max_tso_deferred_mss(tp);
}
EXPORT_SYMBOL_GPL(tcp_is_cwnd_limited);

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1581,7 +1581,7 @@ static int tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb)
* frame, so if we have space for more than 3 frames
* then send now.
*/
if (limit > tcp_max_burst(tp) * tp->mss_cache)
if (limit > tcp_max_tso_deferred_mss(tp) * tp->mss_cache)
goto send_now;
}

Expand Down

0 comments on commit 4a89983

Please sign in to comment.