Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Feb 2009 16:13:01 GMT
From:      Andre Oppermann <andre@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 157797 for review
Message-ID:  <200902161613.n1GGD1SG055304@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=157797

Change 157797 by andre@andre_flirtbox on 2009/02/16 16:12:36

	Refine the segment size calculation in the TSO case.

Affected files ...

.. //depot/projects/tcp_new/netinet/tcp_output.c#3 edit

Differences ...

==== //depot/projects/tcp_new/netinet/tcp_output.c#3 (text+ko) ====

@@ -722,9 +722,11 @@
 	if (len + optlen + ipoptlen > tp->t_maxopd) {
 		flags &= ~TH_FIN;
 		if (tso) {
-			if (len > TCP_MAXWIN - hdrlen - optlen) {
-				len = TCP_MAXWIN - hdrlen - optlen;
-				len = len - (len % (tp->t_maxopd - optlen));
+			int hdrs =  max_linkhdr + hdrlen + optlen + ipoptlen;
+
+			if (len > TCP_MAXWIN - hdrs) {
+				len = TCP_MAXWIN - hdrs;
+				len -= len % (tp->t_maxopd - optlen);
 				sendalot = 1;
 			} else if (tp->t_flags & TF_NEEDFIN)
 				sendalot = 1;



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