summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1996-02-05 19:34:27 +0000
committerwollman <wollman@FreeBSD.org>1996-02-05 19:34:27 +0000
commitb87b197fabb53bb02f46d037ecedd3b6e3272403 (patch)
tree2401b2be8d66d330990f3ff52b40d4022607b2a0 /sys/net
parentdbc684408d82ac0fb086e3252e9fa58238dd08d7 (diff)
downloadFreeBSD-src-b87b197fabb53bb02f46d037ecedd3b6e3272403.zip
FreeBSD-src-b87b197fabb53bb02f46d037ecedd3b6e3272403.tar.gz
Make me feel a little better by filling in reasonable values for rmx_sendpipe
and rmx_recvpipe. This has no demonstrable effect on performance. (ttcp reports about 44 Mbit/s for all the buffer sizes I tried between 16384 and 65536.)
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_loop.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
index cd8568f..e0b32b7 100644
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_loop.c 8.1 (Berkeley) 6/10/93
- * $Id: if_loop.c,v 1.15 1995/12/02 17:11:11 bde Exp $
+ * $Id: if_loop.c,v 1.16 1995/12/09 20:47:13 phk Exp $
*/
/*
@@ -223,9 +223,16 @@ lortrequest(cmd, rt, sa)
struct rtentry *rt;
struct sockaddr *sa;
{
-
- if (rt)
- rt->rt_rmx.rmx_mtu = LOMTU;
+ if (rt) {
+ rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu; /* for ISO */
+ /*
+ * For optimal performance, the send and receive buffers
+ * should be at least twice the MTU plus a little more for
+ * overhead.
+ */
+ rt->rt_rmx.rmx_recvpipe =
+ rt->rt_rmx.rmx_sendpipe = 3 * LOMTU;
+ }
}
/*
@@ -247,8 +254,7 @@ loioctl(ifp, cmd, data)
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
ifa = (struct ifaddr *)data;
- if (ifa != 0 && ifa->ifa_addr->sa_family == AF_ISO)
- ifa->ifa_rtrequest = lortrequest;
+ ifa->ifa_rtrequest = lortrequest;
/*
* Everything else is done at a higher level.
*/
OpenPOWER on IntegriCloud