Lines Matching full:mss

107 /* Calculate mss to advertise in SYN segment.
114 * large MSS.
115 * 4. We do not make 3, we advertise MSS, calculated from first
118 * 5. Value 65535 for MSS is valid in IPv6 and means "as large as possible,
125 int mss = tp->advmss; in tcp_advertise_mss() local
130 if (metric < mss) { in tcp_advertise_mss()
131 mss = metric; in tcp_advertise_mss()
132 tp->advmss = mss; in tcp_advertise_mss()
136 return (__u16)mss; in tcp_advertise_mss()
202 * be a multiple of mss if possible. We assume here that mss >= 1.
205 void tcp_select_initial_window(const struct sock *sk, int __space, __u32 mss, in tcp_select_initial_window() argument
217 /* Quantize space offering to a multiple of mss if possible. */ in tcp_select_initial_window()
218 if (space > mss) in tcp_select_initial_window()
219 space = rounddown(space, mss); in tcp_select_initial_window()
235 *rcv_wnd = min(*rcv_wnd, init_rcv_wnd * mss); in tcp_select_initial_window()
444 u16 mss; /* 0 to disable */ member
672 if (unlikely(opts->mss)) { in tcp_options_write()
675 opts->mss); in tcp_options_write()
832 /* We always get an MSS option. The option bytes which will be seen in in tcp_syn_options()
833 * normal data packets should timestamps be used, must be in the MSS in tcp_syn_options()
841 opts->mss = tcp_advertise_mss(sk); in tcp_syn_options()
895 unsigned int mss, struct sk_buff *skb, in tcp_synack_options() argument
922 /* We always send an MSS option. */ in tcp_synack_options()
923 opts->mss = mss; in tcp_synack_options()
1250 /* Original sch_fq does not pace first 10 MSS in tcp_update_skb_after_send()
1332 * and in this case it is better to delay the delivery of 1-MSS in __tcp_transmit_skb()
1741 /* Calculate MSS not accounting any TCP options. */
1748 /* Calculate base mss without TCP options: in __tcp_mtu_to_mss()
1766 /* Calculate MSS. Not accounting for SACKs here. */
1776 int tcp_mss_to_mtu(struct sock *sk, int mss) in tcp_mss_to_mtu() argument
1781 return mss + in tcp_mss_to_mtu()
1805 /* This function synchronize snd mss to current pmtu/exthdr set.
1807 tp->rx_opt.user_mss is mss set by user by TCP_MAXSEG. It does NOT counts
1810 tp->rx_opt.mss_clamp is mss negotiated at connection setup.
1811 It is minimum of user_mss and mss received with SYN.
1816 tp->mss_cache is current effective sending mss, including
1821 NOTE1. rfc1122 clearly states that advertised MSS
1849 /* Compute the current effective MSS, taking SACKs and IP options,
1961 /* Update snd_sml if this skb is under mss
1962 * Note that a TSO packet might end with a sub-mss segment
1964 * if ((skb->len % mss) != 0)
2060 /* If last segment is not a full MSS, check if Nagle rules allow us in tcp_mss_split_point()
2062 * Otherwise, we'll split the skb at last MSS boundary in tcp_mss_split_point()
2321 int mss = tcp_current_mss(sk); in tcp_mtu_check_reprobe() local
2328 icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, mss); in tcp_mtu_check_reprobe()
2537 * be resegmented into mss-sized pieces by tcp_write_xmit(). in tcp_mtu_probe()
2691 * snd_up-64k-mss .. snd_up cannot be large. However, taking into
2905 int mss = tcp_current_mss(sk); in tcp_send_loss_probe() local
2913 if (skb && tcp_snd_wnd_test(tp, skb, mss)) { in tcp_send_loss_probe()
2915 tcp_write_xmit(sk, mss, TCP_NAGLE_OFF, 2, GFP_ATOMIC); in tcp_send_loss_probe()
2923 "invalid inflight: %u state %u cwnd %u mss %d\n", in tcp_send_loss_probe()
2924 tp->packets_out, sk->sk_state, tcp_snd_cwnd(tp), mss); in tcp_send_loss_probe()
2936 if ((pcount > 1) && (skb->len > (pcount - 1) * mss)) { in tcp_send_loss_probe()
2938 (pcount - 1) * mss, mss, in tcp_send_loss_probe()
3003 * RCV.BUFF - RCV.USER - RCV.WINDOW >= min(1/2 RCV.BUFF, MSS)"
3006 * it at least MSS bytes.
3022 * space available and the free space is less than 1/2 mss,
3024 * [ Actually, bsd uses MSS and 1/4 of maximal _window_ ]
3035 * multiple of MSS, at least until the free space gets quite small.
3041 * a multiple of the mss when it is feasible to do so.
3051 /* MSS for the peer's data. Previous versions used mss_clamp in __tcp_select_window()
3053 * of peer's MSS is better for the performance. It's more correct in __tcp_select_window()
3057 int mss = icsk->icsk_ack.rcv_mss; in __tcp_select_window() local
3067 if (unlikely(mss > full_space)) { in __tcp_select_window()
3068 mss = full_space; in __tcp_select_window()
3069 if (mss <= 0) in __tcp_select_window()
3092 /* if free space is less than mss estimate, or is below 1/16th in __tcp_select_window()
3096 * With large window, mss test triggers way too late in order in __tcp_select_window()
3099 if (free_space < (allowed_space >> 4) || free_space < mss) in __tcp_select_window()
3107 * scaled window will not line up with the MSS boundary anyway. in __tcp_select_window()
3114 * 1<<rcv_wscale > mss. in __tcp_select_window()
3119 /* Get the largest window that is a nice multiple of mss. in __tcp_select_window()
3121 * If our current window offering is within 1 mss of the in __tcp_select_window()
3127 if (window <= free_space - mss || window > free_space) in __tcp_select_window()
3128 window = rounddown(free_space, mss); in __tcp_select_window()
3129 else if (mss == full_space && in __tcp_select_window()
3147 if (free_space < (allowed_space >> 4) || free_space < mss || in __tcp_select_window()
3677 int mss; in tcp_make_synack() local
3707 mss = tcp_mss_clamp(tp, dst_metric_advmss(dst)); in tcp_make_synack()
3759 tcp_header_size = tcp_synack_options(sk, req, mss, skb, &opts, in tcp_make_synack()
3934 tp->rx_opt.mss_clamp = tp->advmss; /* If MSS is not cached */ in tcp_send_syn_data()
3938 /* MSS for SYN-data is based on cached MSS and bounded by PMTU and in tcp_send_syn_data()
3939 * user-MSS. Reserve maximum option space for middleboxes that add in tcp_send_syn_data()
4296 unsigned int mss = tcp_current_mss(sk); in tcp_write_wakeup() local
4307 skb->len > mss) { in tcp_write_wakeup()
4308 seg_size = min(seg_size, mss); in tcp_write_wakeup()
4311 skb, seg_size, mss, GFP_ATOMIC)) in tcp_write_wakeup()
4314 tcp_set_skb_tso_segs(skb, mss); in tcp_write_wakeup()