diff options
author | David S. Miller <davem@davemloft.net> | 2005-07-05 18:24:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-07-05 18:24:38 -0400 |
commit | c1b4a7e69576d65efc31a8cea0714173c2841244 (patch) | |
tree | 92082532651cddc6f0649a9d7ca9ca63e381d310 /include/net | |
parent | 0d9901df62fe4820aee86b49f1a074cdb5c6928e (diff) |
[TCP]: Move to new TSO segmenting scheme.
Make TSO segment transmit size decisions at send time not earlier.
The basic scheme is that we try to build as large a TSO frame as
possible when pulling in the user data, but the size of the TSO frame
output to the card is determined at transmit time.
This is guided by tp->xmit_size_goal. It is always set to a multiple
of MSS and tells sendmsg/sendpage how large an SKB to try and build.
Later, tcp_write_xmit() and tcp_push_one() chop up the packet if
necessary and conditions warrant. These routines can also decide to
"defer" in order to wait for more ACKs to arrive and thus allow larger
TSO frames to be emitted.
A general observation is that TSO elongates the pipe, thus requiring a
larger congestion window and larger buffering especially at the sender
side. Therefore, it is important that applications 1) get a large
enough socket send buffer (this is accomplished by our dynamic send
buffer expansion code) 2) do large enough writes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/tcp.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index b19238027da8..a166918ca56d 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -862,7 +862,7 @@ extern int tcp_write_wakeup(struct sock *); | |||
862 | extern void tcp_send_fin(struct sock *sk); | 862 | extern void tcp_send_fin(struct sock *sk); |
863 | extern void tcp_send_active_reset(struct sock *sk, int priority); | 863 | extern void tcp_send_active_reset(struct sock *sk, int priority); |
864 | extern int tcp_send_synack(struct sock *); | 864 | extern int tcp_send_synack(struct sock *); |
865 | extern void tcp_push_one(struct sock *, unsigned mss_now); | 865 | extern void tcp_push_one(struct sock *, unsigned int mss_now); |
866 | extern void tcp_send_ack(struct sock *sk); | 866 | extern void tcp_send_ack(struct sock *sk); |
867 | extern void tcp_send_delayed_ack(struct sock *sk); | 867 | extern void tcp_send_delayed_ack(struct sock *sk); |
868 | 868 | ||
@@ -968,7 +968,7 @@ static inline void tcp_reset_xmit_timer(struct sock *sk, int what, unsigned long | |||
968 | static inline void tcp_initialize_rcv_mss(struct sock *sk) | 968 | static inline void tcp_initialize_rcv_mss(struct sock *sk) |
969 | { | 969 | { |
970 | struct tcp_sock *tp = tcp_sk(sk); | 970 | struct tcp_sock *tp = tcp_sk(sk); |
971 | unsigned int hint = min(tp->advmss, tp->mss_cache_std); | 971 | unsigned int hint = min_t(unsigned int, tp->advmss, tp->mss_cache); |
972 | 972 | ||
973 | hint = min(hint, tp->rcv_wnd/2); | 973 | hint = min(hint, tp->rcv_wnd/2); |
974 | hint = min(hint, TCP_MIN_RCVMSS); | 974 | hint = min(hint, TCP_MIN_RCVMSS); |