]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#893] addressed review
authorRazvan Becheriu <razvan@isc.org>
Wed, 18 Mar 2020 14:48:11 +0000 (16:48 +0200)
committerRazvan Becheriu <razvan@isc.org>
Wed, 18 Mar 2020 14:48:11 +0000 (16:48 +0200)
ChangeLog
src/bin/dhcp4/ctrl_dhcp4_srv.cc
src/bin/dhcp4/dhcp4_messages.cc
src/bin/dhcp4/dhcp4_messages.h
src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp4/main.cc
src/bin/dhcp6/ctrl_dhcp6_srv.cc
src/bin/dhcp6/dhcp6_messages.cc
src/bin/dhcp6/dhcp6_messages.h
src/bin/dhcp6/dhcp6_messages.mes
src/bin/dhcp6/main.cc

index 14be42c3adedd729146dec9d6c8aadbfd2698353..f662ba677cb51ea52b62dab828ce90583b615683 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
        The RAII MultiThreadingCriticalSection class is now able to
        automatically stop and start the packet thread pool in order to
index 4961ba280071f014fe9506693b8e0f5eaa89c395..c6e6bac8874c385785eae51631d2ce1b12ab5dc8 100644 (file)
@@ -169,7 +169,6 @@ ControlledDhcpv4Srv::loadConfigFile(const std::string& file_name) {
                       "processCommand(\"config-set\", json)");
         }
 
-        // @todo enable multi-threading - disabled for now
         bool enabled = false;
         if (srv_thread_count >= 0) {
             enabled = true;
index 6e72597bded7c6e7530c2e25b21015a866823dee..2d51a7ff4966c98f6214057f37d6cfd9c5d4289c 100644 (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 <log/message_types.h>
@@ -226,7 +226,7 @@ const char* values[] = {
     "DHCP4_LEASE_ADVERT", "%1: lease %2 will be advertised",
     "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_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_CREATION_FAILED", "%1: failed to generate name change requests for DNS: %2",
     "DHCP4_NOT_RUNNING", "DHCPv4 server is not running",
index 7901f06885017ac1619de5b07e36f81ff1992872..a2efea11636871e35487f453ed4ec2d7f920dd9f 100644 (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
 #define DHCP4_MESSAGES_H
index 7d6adc83857b0db8643332d7371201c21dcdb543..45b65e96404584a4f673d68061f06c4e2f60160f 100644 (file)
@@ -441,7 +441,7 @@ lifetime.
 This is a message listing some information about the multi-threading parameters
 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.
 
 % DHCP4_NCR_CREATE %1: DDNS updates enabled, therefore sending name change requests
index 5978ce67c5d6ff86572681dcdd7cbade6fd70af2..98d3b40fb7e6c8c29190dbd63fb26e0daf289ecb 100644 (file)
@@ -48,7 +48,7 @@ usage() {
     cerr << "Kea DHCPv4 server, version " << VERSION << endl;
     cerr << endl;
     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 extended version and exit" << endl;
     cerr << "  -W: display the configuration report and exit" << endl;
index 41f9dcd2a8889bb496c8f6ba2035b901f9315e90..3929b86b1cb6ea3b86b35bba936e328a5a525483 100644 (file)
@@ -140,7 +140,6 @@ ControlledDhcpv6Srv::loadConfigFile(const std::string& file_name) {
                       "processCommand(\"config-set\", json)");
         }
 
-        // @todo enable multi-threading - disabled for now
         bool enabled = false;
         if (srv_thread_count >= 0) {
             enabled = true;
index 14249f275dd1b04c8f1022cfbc560919919debb8..803f233a1728810334b924435381340ef6d0df03 100644 (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 <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_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_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_NO_INTERFACES", "failed to detect any network interfaces",
     "DHCP6_NO_SOCKETS_OPEN", "no interface configured to listen to DHCP traffic",
index 743c205c5eebed3a948ff1a88f8d594549dde437..e044c65e7f1db4d7bb73390940d93c7dc89c3ce9 100644 (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
 #define DHCP6_MESSAGES_H
index dbeb73c321acb88a6c65911412bf20334efc0ca3..a074a6379ecde4603ac23014f9bba2decf402746 100644 (file)
@@ -488,7 +488,7 @@ IAID.
 This is a message listing some information about the multi-threading parameters
 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.
 
 % DHCP6_NOT_RUNNING IPv6 DHCP server is not running
index 98cb461dfd69bc5a8b866bb23a951422fe88ef7c..2f8b5940a47331784dd7ccaa70a92edddd0c0220 100644 (file)
@@ -48,7 +48,7 @@ usage() {
     cerr << "Kea DHCPv6 server, version " << VERSION << endl;
     cerr << endl;
     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 extended version and exit" << endl;
     cerr << "  -W: display the configuration report and exit" << endl;