Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Mar 2012 19:03:26 +0000 (UTC)
From:      Andre Oppermann <andre@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r232474 - user/andre/tcp_workqueue/sys/netinet
Message-ID:  <201203031903.q23J3QfF096252@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andre
Date: Sat Mar  3 19:03:26 2012
New Revision: 232474
URL: http://svn.freebsd.org/changeset/base/232474

Log:
  Allow arbitrary MSS sizes and don't mind about the cluster size anymore.
  We've got more cluster sizes for quite some time now and the orginally
  imposed limits and the previously codified thoughts on efficiency gains
  are no longer true.

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

Modified: user/andre/tcp_workqueue/sys/netinet/tcp_input.c
==============================================================================
--- user/andre/tcp_workqueue/sys/netinet/tcp_input.c	Sat Mar  3 18:58:15 2012	(r232473)
+++ user/andre/tcp_workqueue/sys/netinet/tcp_input.c	Sat Mar  3 19:03:26 2012	(r232474)
@@ -3296,9 +3296,8 @@ tcp_xmit_timer(struct tcpcb *tp, int rtt
  * Determine a reasonable value for maxseg size.
  * If the route is known, check route for mtu.
  * If none, use an mss that can be handled on the outgoing
- * interface without forcing IP to fragment; if bigger than
- * an mbuf cluster (MCLBYTES), round down to nearest multiple of MCLBYTES
- * to utilize large mbufs.  If no route is found, route has no mtu,
+ * interface without forcing IP to fragment.
+ * If no route is found, route has no mtu,
  * or the destination isn't local, use a default, hopefully conservative
  * size (usually 512 or the default IP max size, but no more than the mtu
  * of the interface), as we can't discover anything about intervening
@@ -3476,13 +3475,6 @@ tcp_mss_update(struct tcpcb *tp, int off
 	     (tp->t_flags & TF_RCVD_TSTMP) == TF_RCVD_TSTMP))
 		mss -= TCPOLEN_TSTAMP_APPA;
 
-#if	(MCLBYTES & (MCLBYTES - 1)) == 0
-	if (mss > MCLBYTES)
-		mss &= ~(MCLBYTES-1);
-#else
-	if (mss > MCLBYTES)
-		mss = mss / MCLBYTES * MCLBYTES;
-#endif
 	tp->t_maxseg = mss;
 }
 



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