Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Nov 2012 09:23:21 +0000 (UTC)
From:      Andre Oppermann <andre@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r242602 - user/andre/tcp_workqueue/sys/netinet
Message-ID:  <201211050923.qA59NLSe068769@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andre
Date: Mon Nov  5 09:23:21 2012
New Revision: 242602
URL: http://svnweb.freebsd.org/changeset/base/242602

Log:
  Partial fix for window update problems.

Modified:
  user/andre/tcp_workqueue/sys/netinet/tcp_output.c

Modified: user/andre/tcp_workqueue/sys/netinet/tcp_output.c
==============================================================================
--- user/andre/tcp_workqueue/sys/netinet/tcp_output.c	Mon Nov  5 09:13:06 2012	(r242601)
+++ user/andre/tcp_workqueue/sys/netinet/tcp_output.c	Mon Nov  5 09:23:21 2012	(r242602)
@@ -228,7 +228,7 @@ again:
 	tso = 0;
 	mtu = 0;
 	off = tp->snd_nxt - tp->snd_una;
-	sendwin = min(tp->snd_wnd, tp->snd_cwnd);
+	sendwin = ulmax(ulmin(tp->snd_wnd - off, tp->snd_cwnd), 0);
 
 	flags = tcp_outflags[tp->t_state];
 	/*
@@ -249,7 +249,7 @@ again:
 	    (p = tcp_sack_output(tp, &sack_bytes_rxmt))) {
 		long cwin;
 		
-		cwin = min(tp->snd_wnd, tp->snd_cwnd) - sack_bytes_rxmt;
+		cwin = ulmin(tp->snd_wnd - off, tp->snd_cwnd) - sack_bytes_rxmt;
 		if (cwin < 0)
 			cwin = 0;
 		/* Do not retransmit SACK segments beyond snd_recover */
@@ -355,7 +355,7 @@ after_sack_rexmit:
 			 * sending new data, having retransmitted all the
 			 * data possible in the scoreboard.
 			 */
-			len = ((long)ulmin(so->so_snd.sb_cc, tp->snd_wnd) 
+			len = ((long)ulmin(so->so_snd.sb_cc, tp->snd_wnd - off)
 			       - off);
 			/*
 			 * Don't remove this (len > 0) check !



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211050923.qA59NLSe068769>