From owner-freebsd-ipfw Wed Sep 18 1:22:28 2002 Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A572637B401 for ; Wed, 18 Sep 2002 01:22:25 -0700 (PDT) Received: from mailhost.nxad.com (lan.ext.nxad.com [66.250.180.254]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D54043E81 for ; Wed, 18 Sep 2002 01:22:25 -0700 (PDT) (envelope-from sean@nxad.com) Received: from perrin.int.nxad.com (perrin.int.nxad.com [192.168.1.251]) by mailhost.nxad.com (Postfix) with ESMTP id E41DD212F00 for ; Wed, 18 Sep 2002 01:22:18 -0700 (PDT) Received: by perrin.int.nxad.com (Postfix, from userid 1001) id 9B36B20F03; Wed, 18 Sep 2002 01:22:18 -0700 (PDT) Date: Wed, 18 Sep 2002 01:22:18 -0700 From: Sean Chittenden To: freebsd-ipfw@FreeBSD.org Subject: Increasing the hash table sizes for dummynet... Message-ID: <20020918082218.GJ99484@perrin.int.nxad.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="81JctsDUVPekGcy+" Content-Disposition: inline User-Agent: Mutt/1.4i X-PGP-Key: finger seanc@FreeBSD.org X-PGP-Fingerprint: 6CEB 1B06 BFD3 70F6 95BE 7E4D 8E85 2E0A 5F5B 3ECB X-Web-Homepage: http://sean.chittenden.org/ Sender: owner-freebsd-ipfw@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --81JctsDUVPekGcy+ Content-Type: multipart/mixed; boundary="y9PDtDHaFrXNoMPU" Content-Disposition: inline --y9PDtDHaFrXNoMPU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable The attached patch updates the max size for dummynet pipes to 65K instead of 1024. Comments? -sc --=20 Sean Chittenden --y9PDtDHaFrXNoMPU Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch Content-Transfer-Encoding: quoted-printable Index: sys/netinet/ip_dummynet.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/netinet/ip_dummynet.c,v retrieving revision 1.52 diff -u -r1.52 ip_dummynet.c --- sys/netinet/ip_dummynet.c 15 Aug 2002 16:53:43 -0000 1.52 +++ sys/netinet/ip_dummynet.c 18 Sep 2002 08:20:24 -0000 @@ -1463,8 +1463,8 @@ l =3D dn_hash_size; if (l < 4) l =3D 4; - else if (l > 1024) - l =3D 1024; + else if (l > DN_MAX_HASH_SIZE) + l =3D DN_MAX_HASH_SIZE; x->rq_size =3D l; } else /* one is enough for null mask */ x->rq_size =3D 1; Index: sys/netinet/ip_dummynet.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/netinet/ip_dummynet.h,v retrieving revision 1.22 diff -u -r1.22 ip_dummynet.h --- sys/netinet/ip_dummynet.h 15 Aug 2002 16:53:43 -0000 1.22 +++ sys/netinet/ip_dummynet.h 18 Sep 2002 08:20:24 -0000 @@ -77,6 +77,12 @@ #define OFFSET_OF(type, field) ((int)&( ((type *)0)->field) ) =20 /* + * The maximum hash table size for queues. This value must be a power + * of 2. + */ +#define DN_MAX_HASH_SIZE 65536 + +/* * A heap entry is made of a key and a pointer to the actual * object stored in the heap. * The heap is an array of dn_heap_entry entries, dynamically allocated. Index: sbin/ipfw/ipfw.8 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sbin/ipfw/ipfw.8,v retrieving revision 1.112 diff -u -r1.112 ipfw.8 --- sbin/ipfw/ipfw.8 8 Sep 2002 09:01:08 -0000 1.112 +++ sbin/ipfw/ipfw.8 18 Sep 2002 08:20:24 -0000 @@ -1347,7 +1347,7 @@ .Xr sysctl 8 variable .Em net.inet.ip.dummynet.hash_size , -allowed range is 16 to 1024. +allowed range is 16 to 65536. .Pp .It Cm mask Ar mask-specifier The --y9PDtDHaFrXNoMPU-- --81JctsDUVPekGcy+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Comment: Sean Chittenden iD8DBQE9iDe6joUuCl9bPssRAmTHAJwPpCHfH9HxoCtOTA0eeurZR13oxgCgwExx 2JuTmmYm4WD9ULGSSp0QNTg= =PNuV -----END PGP SIGNATURE----- --81JctsDUVPekGcy+-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ipfw" in the body of the message