svn commit: r242255 - head/sys/netinet

Andre Oppermann andre at FreeBSD.org
Sun Oct 28 18:33:52 UTC 2012


Author: andre
Date: Sun Oct 28 18:33:52 2012
New Revision: 242255
URL: http://svn.freebsd.org/changeset/base/242255

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.
  
  MFC after:	2 weeks

Modified:
  head/sys/netinet/tcp_input.c

Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c	Sun Oct 28 18:07:34 2012	(r242254)
+++ head/sys/netinet/tcp_input.c	Sun Oct 28 18:33:52 2012	(r242255)
@@ -3322,10 +3322,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,
+ * If none, use an mss that can be handled on the outgoing 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
@@ -3506,13 +3504,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-head mailing list