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
218 /* Quantize space offering to a multiple of mss if possible. */ in tcp_select_initial_window()
219 if (space > mss) in tcp_select_initial_window()
220 space = rounddown(space, mss); in tcp_select_initial_window()
236 *rcv_wnd = min(*rcv_wnd, init_rcv_wnd * mss); in tcp_select_initial_window()
445 u16 mss; /* 0 to disable */ member
632 if (unlikely(opts->mss)) { in tcp_options_write()
635 opts->mss); in tcp_options_write()
790 /* We always get an MSS option. The option bytes which will be seen in in tcp_syn_options()
791 * normal data packets should timestamps be used, must be in the MSS in tcp_syn_options()
799 opts->mss = tcp_advertise_mss(sk); in tcp_syn_options()
855 unsigned int mss, struct sk_buff *skb, in tcp_synack_options() argument
880 /* We always send an MSS option. */ in tcp_synack_options()
881 opts->mss = mss; in tcp_synack_options()
1216 /* Original sch_fq does not pace first 10 MSS in tcp_update_skb_after_send()
1298 * and in this case it is better to delay the delivery of 1-MSS in __tcp_transmit_skb()
1698 /* Calculate MSS not accounting any TCP options. */
1705 /* Calculate base mss without TCP options: in __tcp_mtu_to_mss()
1731 /* Calculate MSS. Not accounting for SACKs here. */
1741 int tcp_mss_to_mtu(struct sock *sk, int mss) in tcp_mss_to_mtu() argument
1747 mtu = mss + in tcp_mss_to_mtu()
1780 /* This function synchronize snd mss to current pmtu/exthdr set.
1782 tp->rx_opt.user_mss is mss set by user by TCP_MAXSEG. It does NOT counts
1785 tp->rx_opt.mss_clamp is mss negotiated at connection setup.
1786 It is minimum of user_mss and mss received with SYN.
1791 tp->mss_cache is current effective sending mss, including
1796 NOTE1. rfc1122 clearly states that advertised MSS
1824 /* Compute the current effective MSS, taking SACKs and IP options,
1936 /* Update snd_sml if this skb is under mss
1937 * Note that a TSO packet might end with a sub-mss segment
1939 * if ((skb->len % mss) != 0)
2035 /* If last segment is not a full MSS, check if Nagle rules allow us in tcp_mss_split_point()
2037 * Otherwise, we'll split the skb at last MSS boundary in tcp_mss_split_point()
2296 int mss = tcp_current_mss(sk); in tcp_mtu_check_reprobe() local
2303 icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, mss); in tcp_mtu_check_reprobe()
2510 * be resegmented into mss-sized pieces by tcp_write_xmit(). in tcp_mtu_probe()
2663 * snd_up-64k-mss .. snd_up cannot be large. However, taking into
2877 int mss = tcp_current_mss(sk); in tcp_send_loss_probe() local
2885 if (skb && tcp_snd_wnd_test(tp, skb, mss)) { in tcp_send_loss_probe()
2887 tcp_write_xmit(sk, mss, TCP_NAGLE_OFF, 2, GFP_ATOMIC); in tcp_send_loss_probe()
2895 "invalid inflight: %u state %u cwnd %u mss %d\n", in tcp_send_loss_probe()
2896 tp->packets_out, sk->sk_state, tcp_snd_cwnd(tp), mss); in tcp_send_loss_probe()
2908 if ((pcount > 1) && (skb->len > (pcount - 1) * mss)) { in tcp_send_loss_probe()
2910 (pcount - 1) * mss, mss, in tcp_send_loss_probe()
2975 * RCV.BUFF - RCV.USER - RCV.WINDOW >= min(1/2 RCV.BUFF, MSS)"
2978 * it at least MSS bytes.
2994 * space available and the free space is less than 1/2 mss,
2996 * [ Actually, bsd uses MSS and 1/4 of maximal _window_ ]
3007 * multiple of MSS, at least until the free space gets quite small.
3013 * a multiple of the mss when it is feasible to do so.
3023 /* MSS for the peer's data. Previous versions used mss_clamp in __tcp_select_window()
3025 * of peer's MSS is better for the performance. It's more correct in __tcp_select_window()
3029 int mss = icsk->icsk_ack.rcv_mss; in __tcp_select_window() local
3039 if (unlikely(mss > full_space)) { in __tcp_select_window()
3040 mss = full_space; in __tcp_select_window()
3041 if (mss <= 0) in __tcp_select_window()
3064 /* if free space is less than mss estimate, or is below 1/16th in __tcp_select_window()
3068 * With large window, mss test triggers way too late in order in __tcp_select_window()
3071 if (free_space < (allowed_space >> 4) || free_space < mss) in __tcp_select_window()
3079 * scaled window will not line up with the MSS boundary anyway. in __tcp_select_window()
3086 * 1<<rcv_wscale > mss. in __tcp_select_window()
3091 /* Get the largest window that is a nice multiple of mss. in __tcp_select_window()
3093 * If our current window offering is within 1 mss of the in __tcp_select_window()
3099 if (window <= free_space - mss || window > free_space) in __tcp_select_window()
3100 window = rounddown(free_space, mss); in __tcp_select_window()
3101 else if (mss == full_space && in __tcp_select_window()
3119 if (free_space < (allowed_space >> 4) || free_space < mss || in __tcp_select_window()
3651 int mss; in tcp_make_synack() local
3681 mss = tcp_mss_clamp(tp, dst_metric_advmss(dst)); in tcp_make_synack()
3704 tcp_header_size = tcp_synack_options(sk, req, mss, skb, &opts, md5, in tcp_make_synack()
3868 tp->rx_opt.mss_clamp = tp->advmss; /* If MSS is not cached */ in tcp_send_syn_data()
3872 /* MSS for SYN-data is based on cached MSS and bounded by PMTU and in tcp_send_syn_data()
3873 * user-MSS. Reserve maximum option space for middleboxes that add in tcp_send_syn_data()
4183 unsigned int mss = tcp_current_mss(sk); in tcp_write_wakeup() local
4194 skb->len > mss) { in tcp_write_wakeup()
4195 seg_size = min(seg_size, mss); in tcp_write_wakeup()
4198 skb, seg_size, mss, GFP_ATOMIC)) in tcp_write_wakeup()
4201 tcp_set_skb_tso_segs(skb, mss); in tcp_write_wakeup()