diff options
| author | David S. Miller <davem@nuts.davemloft.net> | 2004-09-06 21:03:16 -0700 |
|---|---|---|
| committer | Patrick McHardy <kaber@trash.net> | 2004-09-06 21:03:16 -0700 |
| commit | 5a6bdc92894c920dcc7fcf7010d0eb05de2e3d21 (patch) | |
| tree | 0cae8445add8c3bee110ea3b61b1ec2377a44141 /include | |
| parent | 95d267365e82205bada1b50fe699fb2284aa090e (diff) | |
[TCP]: Make sure SKB tso factor is setup early enough.
It needs to be set so that congestion window
calculations have a valid value to work with.
This means that doing it at write queue running
time is too late.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/tcp.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 1de15c7a560a..1a8a317f2bd5 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1469,6 +1469,8 @@ tcp_nagle_check(struct tcp_opt *tp, struct sk_buff *skb, unsigned mss_now, int n tcp_minshall_check(tp)))); } +extern void tcp_set_skb_tso_factor(struct sk_buff *, unsigned int, unsigned int); + /* This checks if the data bearing packet SKB (usually sk->sk_send_head) * should be put on the wire right now. */ @@ -1477,6 +1479,11 @@ static __inline__ int tcp_snd_test(struct tcp_opt *tp, struct sk_buff *skb, { int pkts = TCP_SKB_CB(skb)->tso_factor; + if (!pkts) { + tcp_set_skb_tso_factor(skb, cur_mss, tp->mss_cache_std); + pkts = TCP_SKB_CB(skb)->tso_factor; + } + /* RFC 1122 - section 4.2.3.4 * * We must queue if |
