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()
451 u16 mss; /* 0 to disable */ member
681 if (unlikely(opts->mss)) { in tcp_options_write()
684 opts->mss); in tcp_options_write()
841 /* We always get an MSS option. The option bytes which will be seen in in tcp_syn_options()
842 * normal data packets should timestamps be used, must be in the MSS in tcp_syn_options()
850 opts->mss = tcp_advertise_mss(sk); in tcp_syn_options()
906 unsigned int mss, struct sk_buff *skb, in tcp_synack_options() argument
933 /* We always send an MSS option. */ in tcp_synack_options()
934 opts->mss = mss; in tcp_synack_options()
1267 /* Original sch_fq does not pace first 10 MSS in tcp_update_skb_after_send()
1349 * and in this case it is better to delay the delivery of 1-MSS in __tcp_transmit_skb()
1762 /* Calculate MSS not accounting any TCP options. */
1769 /* Calculate base mss without TCP options: in __tcp_mtu_to_mss()
1787 /* Calculate MSS. Not accounting for SACKs here. */
1797 int tcp_mss_to_mtu(struct sock *sk, int mss) in tcp_mss_to_mtu() argument
1802 return mss + in tcp_mss_to_mtu()
1825 /* This function synchronize snd mss to current pmtu/exthdr set.
1827 tp->rx_opt.user_mss is mss set by user by TCP_MAXSEG. It does NOT counts
1830 tp->rx_opt.mss_clamp is mss negotiated at connection setup.
1831 It is minimum of user_mss and mss received with SYN.
1836 tp->mss_cache is current effective sending mss, including
1841 NOTE1. rfc1122 clearly states that advertised MSS
1869 /* Compute the current effective MSS, taking SACKs and IP options,
1981 /* Update snd_sml if this skb is under mss
1982 * Note that a TSO packet might end with a sub-mss segment
1984 * if ((skb->len % mss) != 0)
2080 /* If last segment is not a full MSS, check if Nagle rules allow us in tcp_mss_split_point()
2082 * Otherwise, we'll split the skb at last MSS boundary in tcp_mss_split_point()
2334 int mss = tcp_current_mss(sk); in tcp_mtu_check_reprobe() local
2341 icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, mss); in tcp_mtu_check_reprobe()
2554 * be resegmented into mss-sized pieces by tcp_write_xmit(). in tcp_mtu_probe()
2737 * snd_up-64k-mss .. snd_up cannot be large. However, taking into
2952 int mss = tcp_current_mss(sk); in tcp_send_loss_probe() local
2960 if (skb && tcp_snd_wnd_test(tp, skb, mss)) { in tcp_send_loss_probe()
2962 tcp_write_xmit(sk, mss, TCP_NAGLE_OFF, 2, GFP_ATOMIC); in tcp_send_loss_probe()
2981 if ((pcount > 1) && (skb->len > (pcount - 1) * mss)) { in tcp_send_loss_probe()
2983 (pcount - 1) * mss, mss, in tcp_send_loss_probe()
3048 * RCV.BUFF - RCV.USER - RCV.WINDOW >= min(1/2 RCV.BUFF, MSS)"
3051 * it at least MSS bytes.
3067 * space available and the free space is less than 1/2 mss,
3069 * [ Actually, bsd uses MSS and 1/4 of maximal _window_ ]
3080 * multiple of MSS, at least until the free space gets quite small.
3086 * a multiple of the mss when it is feasible to do so.
3096 /* MSS for the peer's data. Previous versions used mss_clamp in __tcp_select_window()
3098 * of peer's MSS is better for the performance. It's more correct in __tcp_select_window()
3102 int mss = icsk->icsk_ack.rcv_mss; in __tcp_select_window() local
3112 if (unlikely(mss > full_space)) { in __tcp_select_window()
3113 mss = full_space; in __tcp_select_window()
3114 if (mss <= 0) in __tcp_select_window()
3137 /* if free space is less than mss estimate, or is below 1/16th in __tcp_select_window()
3141 * With large window, mss test triggers way too late in order in __tcp_select_window()
3144 if (free_space < (allowed_space >> 4) || free_space < mss) in __tcp_select_window()
3152 * scaled window will not line up with the MSS boundary anyway. in __tcp_select_window()
3159 * 1<<rcv_wscale > mss. in __tcp_select_window()
3164 /* Get the largest window that is a nice multiple of mss. in __tcp_select_window()
3166 * If our current window offering is within 1 mss of the in __tcp_select_window()
3172 if (window <= free_space - mss || window > free_space) in __tcp_select_window()
3173 window = rounddown(free_space, mss); in __tcp_select_window()
3174 else if (mss == full_space && in __tcp_select_window()
3192 if (free_space < (allowed_space >> 4) || free_space < mss || in __tcp_select_window()
3727 int mss; in tcp_make_synack() local
3757 mss = tcp_mss_clamp(tp, dst_metric_advmss(dst)); in tcp_make_synack()
3811 tcp_header_size = tcp_synack_options(sk, req, mss, skb, &opts, in tcp_make_synack()
3986 tp->rx_opt.mss_clamp = tp->advmss; /* If MSS is not cached */ in tcp_send_syn_data()
3990 /* MSS for SYN-data is based on cached MSS and bounded by PMTU and in tcp_send_syn_data()
3991 * user-MSS. Reserve maximum option space for middleboxes that add in tcp_send_syn_data()
4344 unsigned int mss = tcp_current_mss(sk); in tcp_write_wakeup() local
4355 skb->len > mss) { in tcp_write_wakeup()
4356 seg_size = min(seg_size, mss); in tcp_write_wakeup()
4359 skb, seg_size, mss, GFP_ATOMIC)) in tcp_write_wakeup()
4362 tcp_set_skb_tso_segs(skb, mss); in tcp_write_wakeup()