summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.davemloft.net>2004-09-27 23:26:54 -0700
committerDavid S. Miller <davem@nuts.davemloft.net>2004-09-27 23:26:54 -0700
commit23c834301dd71f7f818decfe9dc6cc4205549795 (patch)
tree23d33e78f651c3b7fe0ca0ca716e9bc3fff7d44f /include/net
parentc646b61caf691d986a9e8f59eb73b370aff20f37 (diff)
[TCP]: Uninline tcp_current_mss().
Also fix the return value of tcp_sync_mss() to be unsigned. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/tcp.h34
1 files changed, 2 insertions, 32 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 9709d4e7ca4e..68e15e26d7ed 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -961,7 +961,8 @@ extern void tcp_clear_xmit_timers(struct sock *);
extern void tcp_delete_keepalive_timer (struct sock *);
extern void tcp_reset_keepalive_timer (struct sock *, unsigned long);
-extern int tcp_sync_mss(struct sock *sk, u32 pmtu);
+extern unsigned int tcp_sync_mss(struct sock *sk, u32 pmtu);
+extern unsigned int tcp_current_mss(struct sock *sk, int large);
extern const char timer_bug_msg[];
@@ -1035,37 +1036,6 @@ static inline void tcp_reset_xmit_timer(struct sock *sk, int what, unsigned long
};
}
-/* Compute the current effective MSS, taking SACKs and IP options,
- * and even PMTU discovery events into account.
- *
- * LARGESEND note: !urg_mode is overkill, only frames up to snd_up
- * cannot be large. However, taking into account rare use of URG, this
- * is not a big flaw.
- */
-
-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);
- int do_large, mss_now;
-
- do_large = (large &&
- (sk->sk_route_caps & NETIF_F_TSO) &&
- !tp->urg_mode);
- mss_now = do_large ? tp->mss_cache : tp->mss_cache_std;
-
- if (dst) {
- u32 mtu = dst_pmtu(dst);
- if (mtu != tp->pmtu_cookie ||
- tp->ext2_header_len != dst->header_len)
- mss_now = tcp_sync_mss(sk, mtu);
- }
- if (tp->eff_sacks)
- mss_now -= (TCPOLEN_SACK_BASE_ALIGNED +
- (tp->eff_sacks * TCPOLEN_SACK_PERBLOCK));
- return mss_now;
-}
-
/* Initialize RCV_MSS value.
* RCV_MSS is an our guess about MSS used by the peer.
* We haven't any direct information about the MSS.