summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2012-10-28 18:33:52 +0000
committerandre <andre@FreeBSD.org>2012-10-28 18:33:52 +0000
commitff213d74944d9221c5e7ec192a52a49165208499 (patch)
tree40d7985537b59107c9389fbf64685adf9b95e0fa /sys/netinet
parent2d426461500a5758cfe3fe0a86fcaa42422cfcf6 (diff)
downloadFreeBSD-src-ff213d74944d9221c5e7ec192a52a49165208499.zip
FreeBSD-src-ff213d74944d9221c5e7ec192a52a49165208499.tar.gz
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
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/tcp_input.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 8bf1b0c..22caaf6 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -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 offer, int mtuoffer,
(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;
}
OpenPOWER on IntegriCloud