Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Sep 2002 01:22:18 -0700
From:      Sean Chittenden <seanc@FreeBSD.org>
To:        freebsd-ipfw@FreeBSD.org
Subject:   Increasing the hash table sizes for dummynet...
Message-ID:  <20020918082218.GJ99484@perrin.int.nxad.com>

next in thread | raw e-mail | index | archive | help

--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 <sean@chittenden.org>

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020918082218.GJ99484>