From: "plaisthos (Code Review)" Date: Tue, 10 Mar 2026 12:31:29 +0000 References: Reply-To: arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <14f626763927ded1a4a0661105a72289b87c4dbc-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="oNMwgaduAHM="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Increase default size of internal hash maps to 1024 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: openvpn-devel --oNMwgaduAHM= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable plaisthos has uploaded this change for review. ( http://gerrit.openvpn.net/= c/openvpn/+/1563?usp=3Demail ) Change subject: Increase default size of internal hash maps to 1024 ...................................................................... Increase default size of internal hash maps to 1024 The default of 256 seems quite low for today's standards and cause hash collisions quite quickly. Change-Id: Ia699b0dfa407ac377970bb130434298eaaec592b Signed-off-by: Arne Schwabe --- M doc/man-sections/advanced-options.rst M src/openvpn/options.c 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/63/1563/1 diff --git a/doc/man-sections/advanced-options.rst b/doc/man-sections/advan= ced-options.rst index e1115e4..d922d5d 100644 --- a/doc/man-sections/advanced-options.rst +++ b/doc/man-sections/advanced-options.rst @@ -36,7 +36,7 @@ hash-size r v - By default, both tables are sized at 256 buckets. + By default, both tables are sized at 1024 buckets. --bcast-buffers n Allocate ``n`` buffers for broadcast datagrams (default :code:`256`). diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 8daec42..630a4eb 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -849,8 +849,8 @@ #endif o->vlan_accept =3D VLAN_ALL; o->vlan_pvid =3D 1; - o->real_hash_size =3D 256; - o->virtual_hash_size =3D 256; + o->real_hash_size =3D 1024; + o->virtual_hash_size =3D 1024; o->n_bcast_buf =3D 256; o->tcp_queue_limit =3D 64; o->max_clients =3D 1024; --=20 To view, visit http://gerrit.openvpn.net/c/openvpn/+/1563?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ia699b0dfa407ac377970bb130434298eaaec592b Gerrit-Change-Number: 1563 Gerrit-PatchSet: 1 Gerrit-Owner: plaisthos Gerrit-CC: openvpn-devel --oNMwgaduAHM= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

plaisthos has upl= oaded this change for review.

View Change

Increase default size of internal hash maps to 1024

The default = of 256 seems quite low for today's standards and cause hash
collisio= ns quite quickly.

Change-Id: Ia699b0dfa407ac377970bb130434298eaaec59= 2b
Signed-off-by: Arne Schwabe <arne@...1227...>
---
M doc/m= an-sections/advanced-options.rst
M src/openvpn/options.c
2 files chan= ged, 3 insertions(+), 3 deletions(-)

git pull ss=
h://gerrit.openvpn.net:29418/openvpn refs/changes/63/1563/1
diff --=
git a/doc/man-sections/advanced-options.rst b/doc/man-sections/advanced-opt=
ions.rst
index e1115e4..d922d5d 100644
--- = a/doc/man-sections/advanced-options.rst
+++ b/doc/man-secti= ons/advanced-options.rst
@@ -36,7 +36,7 @@
=
hash-size r v

- By default, both tables are sized at 25= 6 buckets.
+ By defa= ult, both tables are sized at 1024 buckets.

--bcast-buffers n
Allocate ``n`` buffers for broadca= st datagrams (default :code:`256`).
diff --git a/src/openvp= n/options.c b/src/openvpn/options.c
index 8daec42..630a4eb = 100644
--- a/src/openvpn/options.c
+++ b/sr= c/openvpn/options.c
@@ -849,8 +849,8 @@
#e= ndif
o->vlan_accept =3D VLAN_ALL;
= o->vlan_pvid =3D 1;
- o->real_hash_size =3D 256;
- o->virtual_hash_size =3D 256;
+ o->real_hash_size =3D 1024;=
+ o->virtual_hash_siz= e =3D 1024;
o->n_bcast_buf =3D 256;
o->tcp_queue_limit =3D 64;
o->max_clients = =3D 1024;

To view, visit change 1563. To un= subscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia699b0dfa407ac377970bb13043= 4298eaaec592b
Gerrit-Change-Number: 1563
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --oNMwgaduAHM=--