svn commit: r232474 - user/andre/tcp_workqueue/sys/netinet

Andre Oppermann andre at FreeBSD.org
Sat Mar 3 19:03:26 UTC 2012


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;
 }
 


More information about the svn-src-user mailing list