MCPcopy Create free account
hub / github.com/F-Stack/f-stack / tcp_mtudisc

Function tcp_mtudisc

freebsd/netinet/tcp_subr.c:2901–2932  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2899}
2900
2901static void
2902tcp_mtudisc(struct inpcb *inp, int mtuoffer)
2903{
2904 struct tcpcb *tp;
2905 struct socket *so;
2906
2907 INP_WLOCK_ASSERT(inp);
2908 if ((inp->inp_flags & INP_TIMEWAIT) ||
2909 (inp->inp_flags & INP_DROPPED))
2910 return;
2911
2912 tp = intotcpcb(inp);
2913 KASSERT(tp != NULL, ("tcp_mtudisc: tp == NULL"));
2914
2915 tcp_mss_update(tp, -1, mtuoffer, NULL, NULL);
2916
2917 so = inp->inp_socket;
2918 SOCKBUF_LOCK(&so->so_snd);
2919 /* If the mss is larger than the socket buffer, decrease the mss. */
2920 if (so->so_snd.sb_hiwat < tp->t_maxseg)
2921 tp->t_maxseg = so->so_snd.sb_hiwat;
2922 SOCKBUF_UNLOCK(&so->so_snd);
2923
2924 TCPSTAT_INC(tcps_mturesent);
2925 tp->t_rtttime = 0;
2926 tp->snd_nxt = tp->snd_una;
2927 tcp_free_sackholes(tp);
2928 tp->snd_recover = tp->snd_max;
2929 if (tp->t_flags & TF_SACK_PERMIT)
2930 EXIT_FASTRECOVERY(tp->t_flags);
2931 tp->t_fb->tfb_tcp_output(tp);
2932}
2933
2934#ifdef INET
2935/*

Callers 3

tcp_ctlinputFunction · 0.85
tcp6_ctlinputFunction · 0.85
tcp_mtudisc_notifyFunction · 0.85

Calls 2

tcp_mss_updateFunction · 0.85
tcp_free_sackholesFunction · 0.85

Tested by

no test coverage detected