mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 22:15:23 +00:00
kea-dhcp4 will parse and use "queue-control" to configure ring buffer size: "Dhcp4": { "queue-control": { # max number of packets the ring will hold "capacity" : 100 }, : This is an interrim commit for testing purposes. Expect a fair amount of refactoring in subsequent commits. New files: src/lib/dhcp/queue_control.cc src/lib/dhcp/queue_control.h src/lib/dhcp/tests/queue_control_unittest.cc src/lib/dhcpsrv/parsers/queue_control_parser.cc src/lib/dhcpsrv/parsers/queue_control_parser.h src/bin/dhcp4/ctrl_dhcp4_srv.cc ControlledDhcpv4Srv::processConfig() - added logic to set packet queue controller src/bin/dhcp4/dhcp4_lexer.ll b/src/bin/dhcp4/dhcp4_lexer.ll src/bin/dhcp4/dhcp4_parser.yy src/bin/dhcp4/parser_context.* Added queue-control parsing src/bin/dhcp4/json_config_parser.cc configureDhcp4Server() - recognize and parse "queue-control" src/bin/dhcp4/tests/config_parser_unittest.cc TEST_F(Dhcp4ParserTest, queueControl) TEST_F(Dhcp4ParserTest, queueControlInvalid) - new tests src/lib/dhcp/iface_mgr.* IfaceMgr::getPacketQueueControl4() IfaceMgr::setPacketQueueControl4() IfaceMgr::getPacketQueueControl6() IfaceMgr::setPacketQueueControl6() src/lib/dhcp/packet_queue.* Use QueueControl class src/lib/dhcpsrv/srv_config.* Added QueueControl member, getter/setter SrvConfig::toElement() - now emits queue-control if not null
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <dhcpsrv/parsers/host_reservations_list_parser.h>
|
||||
#include <dhcpsrv/parsers/ifaces_config_parser.h>
|
||||
#include <dhcpsrv/parsers/option_data_parser.h>
|
||||
#include <dhcpsrv/parsers/queue_control_parser.h>
|
||||
#include <dhcpsrv/parsers/simple_parser4.h>
|
||||
#include <dhcpsrv/parsers/shared_networks_list_parser.h>
|
||||
#include <dhcpsrv/parsers/sanity_checks_parser.h>
|
||||
@@ -380,6 +381,13 @@ configureDhcp4Server(Dhcpv4Srv& server, isc::data::ConstElementPtr config_set,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (config_pair.first == "queue-control") {
|
||||
QueueControlParser parser(AF_INET);
|
||||
QueueControlPtr queue_control = parser.parse(config_pair.second);
|
||||
srv_cfg->setQueueControlInfo(queue_control);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (config_pair.first == "host-reservation-identifiers") {
|
||||
HostReservationIdsParser4 parser;
|
||||
parser.parse(config_pair.second);
|
||||
|
Reference in New Issue
Block a user