diff options
| author | David S. Miller <davem@nuts.davemloft.net> | 2004-09-06 20:01:22 -0700 |
|---|---|---|
| committer | Patrick McHardy <kaber@trash.net> | 2004-09-06 20:01:22 -0700 |
| commit | 95d267365e82205bada1b50fe699fb2284aa090e (patch) | |
| tree | 488e707c937978bd0d02e710f007a42c7c723f06 /include | |
| parent | 14a1f44569619b2dfda526dc0f73b9bf0df74171 (diff) | |
[TCP]: Calculate SKB tso factor more accurately.
Eliminate tp->mss_tso_factor. Instead, we calculate the
SKB tso factor as we walk the write queue for initial
transmit or fragment SKBs.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/tcp.h | 1 | ||||
| -rw-r--r-- | include/net/tcp.h | 8 |
2 files changed, 3 insertions, 6 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index ebf15b6a8162..86ca98c5ef8f 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h @@ -254,7 +254,6 @@ struct tcp_opt { __u32 max_window; /* Maximal window ever seen from peer */ __u32 pmtu_cookie; /* Last pmtu seen by socket */ __u32 mss_cache; /* Cached effective mss, not including SACKS */ - __u32 mss_tso_factor; /* Real packets per TSO packet */ __u16 mss_cache_std; /* Like mss_cache, but without TSO */ __u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ __u16 ext_header_len; /* Network protocol overhead (IP/IPv6 options) */ diff --git a/include/net/tcp.h b/include/net/tcp.h index efda37b84207..1de15c7a560a 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1047,7 +1047,7 @@ static inline void tcp_reset_xmit_timer(struct sock *sk, int what, unsigned long * is not a big flaw. */ -static inline unsigned int tcp_current_mss(struct sock *sk, int large, int *factor) +static inline unsigned int tcp_current_mss(struct sock *sk, int large) { struct tcp_opt *tp = tcp_sk(sk); struct dst_entry *dst = __sk_dst_get(sk); @@ -1057,8 +1057,6 @@ static inline unsigned int tcp_current_mss(struct sock *sk, int large, int *fact (sk->sk_route_caps & NETIF_F_TSO) && !tp->urg_mode); mss_now = do_large ? tp->mss_cache : tp->mss_cache_std; - if (factor) - *factor = do_large ? tp->mss_tso_factor : 1; if (dst) { u32 mtu = dst_pmtu(dst); @@ -1545,7 +1543,7 @@ static __inline__ void __tcp_push_pending_frames(struct sock *sk, static __inline__ void tcp_push_pending_frames(struct sock *sk, struct tcp_opt *tp) { - __tcp_push_pending_frames(sk, tp, tcp_current_mss(sk, 1, NULL), tp->nonagle); + __tcp_push_pending_frames(sk, tp, tcp_current_mss(sk, 1), tp->nonagle); } static __inline__ int tcp_may_send_now(struct sock *sk, struct tcp_opt *tp) @@ -1553,7 +1551,7 @@ static __inline__ int tcp_may_send_now(struct sock *sk, struct tcp_opt *tp) struct sk_buff *skb = sk->sk_send_head; return (skb && - tcp_snd_test(tp, skb, tcp_current_mss(sk, 1, NULL), + tcp_snd_test(tp, skb, tcp_current_mss(sk, 1), tcp_skb_is_last(sk, skb) ? TCP_NAGLE_PUSH : tp->nonagle)); } |
