svn commit: r211549 - stable/7/sys/netinet

Andre Oppermann andre at FreeBSD.org
Sat Aug 21 11:11:33 UTC 2010


Author: andre
Date: Sat Aug 21 11:11:32 2010
New Revision: 211549
URL: http://svn.freebsd.org/changeset/base/211549

Log:
  MFC r211317:
  
    Reset the internal tso flag in tcp_output() on every iteration
    of sendalot.

Modified:
  stable/7/sys/netinet/tcp_output.c

Modified: stable/7/sys/netinet/tcp_output.c
==============================================================================
--- stable/7/sys/netinet/tcp_output.c	Sat Aug 21 11:10:58 2010	(r211548)
+++ stable/7/sys/netinet/tcp_output.c	Sat Aug 21 11:11:32 2010	(r211549)
@@ -140,7 +140,7 @@ tcp_output(struct tcpcb *tp)
 	int idle, sendalot;
 	int sack_rxmit, sack_bytes_rxmt;
 	struct sackhole *p;
-	int tso = 0;
+	int tso;
 	struct tcpopt to;
 #if 0
 	int maxburst = TCP_MAXBURST;
@@ -198,6 +198,7 @@ again:
 	    SEQ_LT(tp->snd_nxt, tp->snd_max))
 		tcp_sack_adjust(tp);
 	sendalot = 0;
+	tso = 0;
 	off = tp->snd_nxt - tp->snd_una;
 	sendwin = min(tp->snd_wnd, tp->snd_cwnd);
 	sendwin = min(sendwin, tp->snd_bwnd);
@@ -477,9 +478,9 @@ after_sack_rexmit:
 		} else {
 			len = tp->t_maxseg;
 			sendalot = 1;
-			tso = 0;
 		}
 	}
+
 	if (sack_rxmit) {
 		if (SEQ_LT(p->rxmit + len, tp->snd_una + so->so_snd.sb_cc))
 			flags &= ~TH_FIN;
@@ -995,6 +996,8 @@ send:
 	 * XXX: Fixme: This is currently not the case for IPv6.
 	 */
 	if (tso) {
+		KASSERT(len > tp->t_maxopd - optlen,
+		    ("%s: len <= tso_segsz", __func__));
 		m->m_pkthdr.csum_flags |= CSUM_TSO;
 		m->m_pkthdr.tso_segsz = tp->t_maxopd - optlen;
 	}


More information about the svn-src-stable mailing list