Browse code

uac: Add reg_hash_size parameter

Allow configuring the hash table size. The default(4) is hardly usable
on anything but a test system.

Alex Hermann authored on 04/05/2021 08:22:04 • Daniel-Constantin Mierla committed on 05/05/2021 18:45:23
Showing 2 changed files
... ...
@@ -459,6 +459,26 @@ modparam("uac", "reg_random_delay", 300)
459 459
 			</example>
460 460
 		</section>
461 461
 
462
+		<section id="uac.p.reg_hash_size">
463
+			<title><varname>reg_hash_size</varname> (int)</title>
464
+			<para>
465
+			 The number of entries of the hash table used by uac_reg to store the
466
+			 registration records is 2^hash_size. For hash_size=4, the number of
467
+			 slots of the hash table is 16.
468
+			</para>
469
+			<para>
470
+				<emphasis>Default value is <quote>4</quote> (16 slots).</emphasis>
471
+			</para>
472
+			<example>
473
+				<title>Set <varname>reg_hash_size</varname> parameter</title>
474
+				<programlisting format="linespecific">
475
+...
476
+modparam("uac", "reg_hash_size", 10)
477
+...
478
+				</programlisting>
479
+			</example>
480
+		</section>
481
+
462 482
 		<section id="uac.p.reg_db_table">
463 483
 			<title><varname>reg_db_table</varname> (string)</title>
464 484
 			<para>
... ...
@@ -181,6 +181,7 @@ static param_export_t params[] = {
181 181
 	{"reg_random_delay",	INT_PARAM,			&reg_random_delay      },
182 182
 	{"reg_active",	INT_PARAM,			&reg_active_param      },
183 183
 	{"reg_gc_interval",		INT_PARAM,	&_uac_reg_gc_interval	},
184
+	{"reg_hash_size",	INT_PARAM,			&reg_htable_size      },
184 185
 	{"default_socket",	PARAM_STR, &uac_default_socket},
185 186
 	{"event_callback",	PARAM_STR,	&uac_event_callback},
186 187
 	{0, 0, 0}