Date: Sat, 8 Nov 2008 23:26:24 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r184772 - user/kmacy/HEAD_fast_multi_xmit/sys/netinet Message-ID: <200811082326.mA8NQO4B024618@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kmacy Date: Sat Nov 8 23:26:24 2008 New Revision: 184772 URL: http://svn.freebsd.org/changeset/base/184772 Log: Bringback recursion sanity check Modified: user/kmacy/HEAD_fast_multi_xmit/sys/netinet/tcp_input.c user/kmacy/HEAD_fast_multi_xmit/sys/netinet/tcp_subr.c user/kmacy/HEAD_fast_multi_xmit/sys/netinet/tcp_var.h Modified: user/kmacy/HEAD_fast_multi_xmit/sys/netinet/tcp_input.c ============================================================================== --- user/kmacy/HEAD_fast_multi_xmit/sys/netinet/tcp_input.c Sat Nov 8 20:40:39 2008 (r184771) +++ user/kmacy/HEAD_fast_multi_xmit/sys/netinet/tcp_input.c Sat Nov 8 23:26:24 2008 (r184772) @@ -3116,7 +3116,7 @@ tcp_xmit_timer(struct tcpcb *tp, int rtt */ void tcp_mss_update(struct tcpcb *tp, int offer, - struct hc_metrics_lite *metricptr, int *mtuflags) + struct hc_metrics_lite *metricptr, int *mtuflags, int *mssval) { INIT_VNET_INET(tp->t_inpcb->inp_vnet); int mss; @@ -3243,6 +3243,11 @@ tcp_mss_update(struct tcpcb *tp, int off */ mss = max(mss, 64); + if (mssval) + *mssval = mss; + + if (tp->t_maxopd <= mss) + return; /* * maxopd stores the maximum length of data AND options * in a segment; maxseg is the amount of data in a normal @@ -3285,7 +3290,7 @@ tcp_mss(struct tcpcb *tp, int offer) #endif KASSERT(tp != NULL, ("%s: tp == NULL", __func__)); - tcp_mss_update(tp, offer, &metrics, &mtuflags); + tcp_mss_update(tp, offer, &metrics, &mtuflags, NULL); mss = tp->t_maxseg; inp = tp->t_inpcb; Modified: user/kmacy/HEAD_fast_multi_xmit/sys/netinet/tcp_subr.c ============================================================================== --- user/kmacy/HEAD_fast_multi_xmit/sys/netinet/tcp_subr.c Sat Nov 8 20:40:39 2008 (r184771) +++ user/kmacy/HEAD_fast_multi_xmit/sys/netinet/tcp_subr.c Sat Nov 8 23:26:24 2008 (r184772) @@ -1553,7 +1553,8 @@ tcp_mtudisc(struct inpcb *inp, int errno INIT_VNET_INET(inp->inp_vnet); struct tcpcb *tp; struct socket *so; - + int mss; + INP_WLOCK_ASSERT(inp); if ((inp->inp_vflag & INP_TIMEWAIT) || (inp->inp_vflag & INP_DROPPED)) @@ -1562,7 +1563,7 @@ tcp_mtudisc(struct inpcb *inp, int errno tp = intotcpcb(inp); KASSERT(tp != NULL, ("tcp_mtudisc: tp == NULL")); - tcp_mss_update(tp, -1, NULL, NULL); + tcp_mss_update(tp, -1, NULL, NULL, &mss); so = inp->inp_socket; SOCKBUF_LOCK(&so->so_snd); @@ -1578,6 +1579,8 @@ tcp_mtudisc(struct inpcb *inp, int errno tp->snd_recover = tp->snd_max; if (tp->t_flags & TF_SACK_PERMIT) EXIT_FASTRECOVERY(tp); + if (tp->t_maxopd <= mss) + return (inp); tcp_output_send(tp); return (inp); } Modified: user/kmacy/HEAD_fast_multi_xmit/sys/netinet/tcp_var.h ============================================================================== --- user/kmacy/HEAD_fast_multi_xmit/sys/netinet/tcp_var.h Sat Nov 8 20:40:39 2008 (r184771) +++ user/kmacy/HEAD_fast_multi_xmit/sys/netinet/tcp_var.h Sat Nov 8 23:26:24 2008 (r184772) @@ -546,7 +546,7 @@ void tcp_reass_init(void); void tcp_input(struct mbuf *, int); u_long tcp_maxmtu(struct in_conninfo *, int *); u_long tcp_maxmtu6(struct in_conninfo *, int *); -void tcp_mss_update(struct tcpcb *, int, struct hc_metrics_lite *, int *); +void tcp_mss_update(struct tcpcb *, int, struct hc_metrics_lite *, int *, int *); void tcp_mss(struct tcpcb *, int); int tcp_mssopt(struct in_conninfo *); struct inpcb *
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811082326.mA8NQO4B024618>