mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
3214. [func] Add 'named -U' option to set the number of UDP
listener threads per interface. [RT #26485]
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: main.c,v 1.184 2011/11/05 00:45:31 each Exp $ */
|
||||
/* $Id: main.c,v 1.185 2011/11/09 18:44:03 each Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -418,7 +418,7 @@ parse_command_line(int argc, char *argv[]) {
|
||||
isc_commandline_errprint = ISC_FALSE;
|
||||
while ((ch = isc_commandline_parse(argc, argv,
|
||||
"46c:C:d:E:fFgi:lm:n:N:p:P:"
|
||||
"sS:t:T:u:vVx:")) != -1) {
|
||||
"sS:t:T:U:u:vVx:")) != -1) {
|
||||
switch (ch) {
|
||||
case '4':
|
||||
if (disable4)
|
||||
@@ -527,6 +527,11 @@ parse_command_line(int argc, char *argv[]) {
|
||||
fprintf(stderr, "unknown -T flag '%s\n",
|
||||
isc_commandline_argument);
|
||||
break;
|
||||
case 'U':
|
||||
ns_g_udpdisp = parse_int(isc_commandline_argument,
|
||||
"number of UDP listeners "
|
||||
"per interface");
|
||||
break;
|
||||
case 'u':
|
||||
ns_g_username = isc_commandline_argument;
|
||||
break;
|
||||
@@ -585,6 +590,12 @@ create_managers(void) {
|
||||
#else
|
||||
ns_g_cpus = 1;
|
||||
#endif
|
||||
if (ns_g_udpdisp == 0 || ns_g_udpdisp > ns_g_cpus)
|
||||
ns_g_udpdisp = ns_g_cpus;
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER,
|
||||
ISC_LOG_INFO, "using %u UDP listener%s per interface",
|
||||
ns_g_udpdisp, ns_g_udpdisp == 1 ? "" : "s");
|
||||
|
||||
result = isc_taskmgr_create(ns_g_mctx, ns_g_cpus, 0, &ns_g_taskmgr);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
|
Reference in New Issue
Block a user