From b87b197fabb53bb02f46d037ecedd3b6e3272403 Mon Sep 17 00:00:00 2001 From: wollman Date: Mon, 5 Feb 1996 19:34:27 +0000 Subject: 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.) --- sys/net/if_loop.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'sys') 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. */ -- cgit v1.1