Lines Matching full:mss
109 /* Calculate mss to advertise in SYN segment.
116 * large MSS.
117 * 4. We do not make 3, we advertise MSS, calculated from first
120 * 5. Value 65535 for MSS is valid in IPv6 and means "as large as possible,
127 int mss = tp->advmss; in tcp_advertise_mss() local
132 if (metric < mss) { in tcp_advertise_mss()
133 mss = metric; in tcp_advertise_mss()
134 tp->advmss = mss; in tcp_advertise_mss()
138 return (__u16)mss; in tcp_advertise_mss()
204 * be a multiple of mss if possible. We assume here that mss >= 1.
207 void tcp_select_initial_window(const struct sock *sk, int __space, __u32 mss, in tcp_select_initial_window() argument
220 /* Quantize space offering to a multiple of mss if possible. */ in tcp_select_initial_window()
221 if (space > mss) in tcp_select_initial_window()
222 space = rounddown(space, mss); in tcp_select_initial_window()
238 *rcv_wnd = min(*rcv_wnd, init_rcv_wnd * mss); in tcp_select_initial_window()
448 u16 mss; /* 0 to disable */ member
676 if (unlikely(opts->mss)) { in tcp_options_write()
679 opts->mss); in tcp_options_write()
836 /* We always get an MSS option. The option bytes which will be seen in in tcp_syn_options()
837 * normal data packets should timestamps be used, must be in the MSS in tcp_syn_options()
845 opts->mss = tcp_advertise_mss(sk); in tcp_syn_options()
899 unsigned int mss, struct sk_buff *skb, in tcp_synack_options() argument
926 /* We always send an MSS option. */ in tcp_synack_options()
927 opts->mss = mss; in tcp_synack_options()
1254 /* Original sch_fq does not pace first 10 MSS in tcp_update_skb_after_send()
1336 * and in this case it is better to delay the delivery of 1-MSS in __tcp_transmit_skb()
1749 /* Calculate MSS not accounting any TCP options. */
1756 /* Calculate base mss without TCP options: in __tcp_mtu_to_mss()
1774 /* Calculate MSS. Not accounting for SACKs here. */
1784 int tcp_mss_to_mtu(struct sock *sk, int mss) in tcp_mss_to_mtu() argument
1789 return mss + in tcp_mss_to_mtu()
1813 /* This function synchronize snd mss to current pmtu/exthdr set.
1815 tp->rx_opt.user_mss is mss set by user by TCP_MAXSEG. It does NOT counts
1818 tp->rx_opt.mss_clamp is mss negotiated at connection setup.
1819 It is minimum of user_mss and mss received with SYN.
1824 tp->mss_cache is current effective sending mss, including
1829 NOTE1. rfc1122 clearly states that advertised MSS
1857 /* Compute the current effective MSS, taking SACKs and IP options,
1969 /* Update snd_sml if this skb is under mss
1970 * Note that a TSO packet might end with a sub-mss segment
1972 * if ((skb->len % mss) != 0)
2068 /* If last segment is not a full MSS, check if Nagle rules allow us in tcp_mss_split_point()
2070 * Otherwise, we'll split the skb at last MSS boundary in tcp_mss_split_point()
2322 int mss = tcp_current_mss(sk); in tcp_mtu_check_reprobe() local
2329 icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, mss); in tcp_mtu_check_reprobe()
2542 * be resegmented into mss-sized pieces by tcp_write_xmit(). in tcp_mtu_probe()
2725 * snd_up-64k-mss .. snd_up cannot be large. However, taking into
2940 int mss = tcp_current_mss(sk); in tcp_send_loss_probe() local
2948 if (skb && tcp_snd_wnd_test(tp, skb, mss)) { in tcp_send_loss_probe()
2950 tcp_write_xmit(sk, mss, TCP_NAGLE_OFF, 2, GFP_ATOMIC); in tcp_send_loss_probe()
2958 "invalid inflight: %u state %u cwnd %u mss %d\n", in tcp_send_loss_probe()
2959 tp->packets_out, sk->sk_state, tcp_snd_cwnd(tp), mss); in tcp_send_loss_probe()
2971 if ((pcount > 1) && (skb->len > (pcount - 1) * mss)) { in tcp_send_loss_probe()
2973 (pcount - 1) * mss, mss, in tcp_send_loss_probe()
3038 * RCV.BUFF - RCV.USER - RCV.WINDOW >= min(1/2 RCV.BUFF, MSS)"
3041 * it at least MSS bytes.
3057 * space available and the free space is less than 1/2 mss,
3059 * [ Actually, bsd uses MSS and 1/4 of maximal _window_ ]
3070 * multiple of MSS, at least until the free space gets quite small.
3076 * a multiple of the mss when it is feasible to do so.
3086 /* MSS for the peer's data. Previous versions used mss_clamp in __tcp_select_window()
3088 * of peer's MSS is better for the performance. It's more correct in __tcp_select_window()
3092 int mss = icsk->icsk_ack.rcv_mss; in __tcp_select_window() local
3102 if (unlikely(mss > full_space)) { in __tcp_select_window()
3103 mss = full_space; in __tcp_select_window()
3104 if (mss <= 0) in __tcp_select_window()
3127 /* if free space is less than mss estimate, or is below 1/16th in __tcp_select_window()
3131 * With large window, mss test triggers way too late in order in __tcp_select_window()
3134 if (free_space < (allowed_space >> 4) || free_space < mss) in __tcp_select_window()
3142 * scaled window will not line up with the MSS boundary anyway. in __tcp_select_window()
3149 * 1<<rcv_wscale > mss. in __tcp_select_window()
3154 /* Get the largest window that is a nice multiple of mss. in __tcp_select_window()
3156 * If our current window offering is within 1 mss of the in __tcp_select_window()
3162 if (window <= free_space - mss || window > free_space) in __tcp_select_window()
3163 window = rounddown(free_space, mss); in __tcp_select_window()
3164 else if (mss == full_space && in __tcp_select_window()
3182 if (free_space < (allowed_space >> 4) || free_space < mss || in __tcp_select_window()
3718 int mss; in tcp_make_synack() local
3748 mss = tcp_mss_clamp(tp, dst_metric_advmss(dst)); in tcp_make_synack()
3802 tcp_header_size = tcp_synack_options(sk, req, mss, skb, &opts, in tcp_make_synack()
3977 tp->rx_opt.mss_clamp = tp->advmss; /* If MSS is not cached */ in tcp_send_syn_data()
3981 /* MSS for SYN-data is based on cached MSS and bounded by PMTU and in tcp_send_syn_data()
3982 * user-MSS. Reserve maximum option space for middleboxes that add in tcp_send_syn_data()
4332 unsigned int mss = tcp_current_mss(sk); in tcp_write_wakeup() local
4343 skb->len > mss) { in tcp_write_wakeup()
4344 seg_size = min(seg_size, mss); in tcp_write_wakeup()
4347 skb, seg_size, mss, GFP_ATOMIC)) in tcp_write_wakeup()
4350 tcp_set_skb_tso_segs(skb, mss); in tcp_write_wakeup()