2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-01 14:35:29 +00:00

[#893] addressed review

This commit is contained in:
Razvan Becheriu
2020-03-18 16:48:11 +02:00
parent fb8a1d2dd2
commit 02d802a50d
11 changed files with 18 additions and 12 deletions

View File

@@ -1,3 +1,11 @@
1730. [func] razvan
Added -N command line switch that enables experimental multi-threading
support. Number of threads can be specified (e.g. -N8) or Kea can be
told to autodetect number of CPU threads (-N0). This feature is
experimental. It hasn't been tested extensively and is known to cause
problems with DDNS and HA. Do not use in production!
(Gitlab #893)
1729. [func] razvan 1729. [func] razvan
The RAII MultiThreadingCriticalSection class is now able to The RAII MultiThreadingCriticalSection class is now able to
automatically stop and start the packet thread pool in order to automatically stop and start the packet thread pool in order to

View File

@@ -169,7 +169,6 @@ ControlledDhcpv4Srv::loadConfigFile(const std::string& file_name) {
"processCommand(\"config-set\", json)"); "processCommand(\"config-set\", json)");
} }
// @todo enable multi-threading - disabled for now
bool enabled = false; bool enabled = false;
if (srv_thread_count >= 0) { if (srv_thread_count >= 0) {
enabled = true; enabled = true;

View File

@@ -1,4 +1,4 @@
// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Mon Mar 16 2020 18:32 // File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Wed Mar 18 2020 16:28
#include <cstddef> #include <cstddef>
#include <log/message_types.h> #include <log/message_types.h>
@@ -226,7 +226,7 @@ const char* values[] = {
"DHCP4_LEASE_ADVERT", "%1: lease %2 will be advertised", "DHCP4_LEASE_ADVERT", "%1: lease %2 will be advertised",
"DHCP4_LEASE_ALLOC", "%1: lease %2 has been allocated for %3 seconds", "DHCP4_LEASE_ALLOC", "%1: lease %2 has been allocated for %3 seconds",
"DHCP4_MULTI_THREADING_INFO", "enabled: %1, number of threads: %2, queue size per thread: %3", "DHCP4_MULTI_THREADING_INFO", "enabled: %1, number of threads: %2, queue size per thread: %3",
"DHCP4_MULTI_THREADING_WARNING", "multi-threading support is experimental. Don't use in production environment.", "DHCP4_MULTI_THREADING_WARNING", "The multi-threading feature is experimental. Don't use in production environment.",
"DHCP4_NCR_CREATE", "%1: DDNS updates enabled, therefore sending name change requests", "DHCP4_NCR_CREATE", "%1: DDNS updates enabled, therefore sending name change requests",
"DHCP4_NCR_CREATION_FAILED", "%1: failed to generate name change requests for DNS: %2", "DHCP4_NCR_CREATION_FAILED", "%1: failed to generate name change requests for DNS: %2",
"DHCP4_NOT_RUNNING", "DHCPv4 server is not running", "DHCP4_NOT_RUNNING", "DHCPv4 server is not running",

View File

@@ -1,4 +1,4 @@
// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Mon Mar 16 2020 18:32 // File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Wed Mar 18 2020 16:28
#ifndef DHCP4_MESSAGES_H #ifndef DHCP4_MESSAGES_H
#define DHCP4_MESSAGES_H #define DHCP4_MESSAGES_H

View File

@@ -441,7 +441,7 @@ lifetime.
This is a message listing some information about the multi-threading parameters This is a message listing some information about the multi-threading parameters
with which the server is running. with which the server is running.
% DHCP4_MULTI_THREADING_WARNING multi-threading support is experimental. Don't use in production environment. % DHCP4_MULTI_THREADING_WARNING The multi-threading feature is experimental. Don't use in production environment.
This is a message warning about the experimental multi-threading feature. This is a message warning about the experimental multi-threading feature.
% DHCP4_NCR_CREATE %1: DDNS updates enabled, therefore sending name change requests % DHCP4_NCR_CREATE %1: DDNS updates enabled, therefore sending name change requests

View File

@@ -48,7 +48,7 @@ usage() {
cerr << "Kea DHCPv4 server, version " << VERSION << endl; cerr << "Kea DHCPv4 server, version " << VERSION << endl;
cerr << endl; cerr << endl;
cerr << "Usage: " << DHCP4_NAME cerr << "Usage: " << DHCP4_NAME
<< " -[v|V|W] [-d] [-{c|t} cfgfile] [-p number] [-P number]" << endl; << " -[v|V|W] [-d] [-{c|t} cfgfile] [-p number] [-P number] [-N number]" << endl;
cerr << " -v: print version number and exit" << endl; cerr << " -v: print version number and exit" << endl;
cerr << " -V: print extended version and exit" << endl; cerr << " -V: print extended version and exit" << endl;
cerr << " -W: display the configuration report and exit" << endl; cerr << " -W: display the configuration report and exit" << endl;

View File

@@ -140,7 +140,6 @@ ControlledDhcpv6Srv::loadConfigFile(const std::string& file_name) {
"processCommand(\"config-set\", json)"); "processCommand(\"config-set\", json)");
} }
// @todo enable multi-threading - disabled for now
bool enabled = false; bool enabled = false;
if (srv_thread_count >= 0) { if (srv_thread_count >= 0) {
enabled = true; enabled = true;

View File

@@ -1,4 +1,4 @@
// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Mon Mar 16 2020 18:36 // File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Wed Mar 18 2020 16:30
#include <cstddef> #include <cstddef>
#include <log/message_types.h> #include <log/message_types.h>
@@ -230,7 +230,7 @@ const char* values[] = {
"DHCP6_LEASE_PD_WITHOUT_DUID", "%1: lease for prefix %2/%3 does not have a DUID", "DHCP6_LEASE_PD_WITHOUT_DUID", "%1: lease for prefix %2/%3 does not have a DUID",
"DHCP6_LEASE_RENEW", "%1: lease for address %2 and iaid=%3 has been allocated", "DHCP6_LEASE_RENEW", "%1: lease for address %2 and iaid=%3 has been allocated",
"DHCP6_MULTI_THREADING_INFO", "enabled: %1, number of threads: %2, queue size per thread: %3", "DHCP6_MULTI_THREADING_INFO", "enabled: %1, number of threads: %2, queue size per thread: %3",
"DHCP6_MULTI_THREADING_WARNING", "multi-threading support is experimental. Don't use in production environment.", "DHCP6_MULTI_THREADING_WARNING", "The multi-threading feature is experimental. Don't use in production environment.",
"DHCP6_NOT_RUNNING", "IPv6 DHCP server is not running", "DHCP6_NOT_RUNNING", "IPv6 DHCP server is not running",
"DHCP6_NO_INTERFACES", "failed to detect any network interfaces", "DHCP6_NO_INTERFACES", "failed to detect any network interfaces",
"DHCP6_NO_SOCKETS_OPEN", "no interface configured to listen to DHCP traffic", "DHCP6_NO_SOCKETS_OPEN", "no interface configured to listen to DHCP traffic",

View File

@@ -1,4 +1,4 @@
// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Mon Mar 16 2020 18:36 // File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Wed Mar 18 2020 16:30
#ifndef DHCP6_MESSAGES_H #ifndef DHCP6_MESSAGES_H
#define DHCP6_MESSAGES_H #define DHCP6_MESSAGES_H

View File

@@ -488,7 +488,7 @@ IAID.
This is a message listing some information about the multi-threading parameters This is a message listing some information about the multi-threading parameters
with which the server is running. with which the server is running.
% DHCP6_MULTI_THREADING_WARNING multi-threading support is experimental. Don't use in production environment. % DHCP6_MULTI_THREADING_WARNING The multi-threading feature is experimental. Don't use in production environment.
This is a message warning about the experimental multi-threading feature. This is a message warning about the experimental multi-threading feature.
% DHCP6_NOT_RUNNING IPv6 DHCP server is not running % DHCP6_NOT_RUNNING IPv6 DHCP server is not running

View File

@@ -48,7 +48,7 @@ usage() {
cerr << "Kea DHCPv6 server, version " << VERSION << endl; cerr << "Kea DHCPv6 server, version " << VERSION << endl;
cerr << endl; cerr << endl;
cerr << "Usage: " << DHCP6_NAME cerr << "Usage: " << DHCP6_NAME
<< " -[v|V|W] [-d] [-{c|t} cfgfile] [-p number] [-P number]" << endl; << " -[v|V|W] [-d] [-{c|t} cfgfile] [-p number] [-P number] [-N number]" << endl;
cerr << " -v: print version number and exit." << endl; cerr << " -v: print version number and exit." << endl;
cerr << " -V: print extended version and exit" << endl; cerr << " -V: print extended version and exit" << endl;
cerr << " -W: display the configuration report and exit" << endl; cerr << " -W: display the configuration report and exit" << endl;