From 129061abbe6f92b4a818a1721629c56b12dba013 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Mon, 4 Sep 2017 16:02:27 +0200 Subject: [PATCH] [5345] Removed DHCP{4,6}_BUFFER_WAIT{,_INTERRUPTED} messages. --- src/bin/dhcp4/dhcp4_messages.mes | 15 --------------- src/bin/dhcp4/dhcp4_srv.cc | 9 +++++---- src/bin/dhcp6/dhcp6_messages.mes | 15 --------------- src/bin/dhcp6/dhcp6_srv.cc | 10 ++++++---- 4 files changed, 11 insertions(+), 38 deletions(-) diff --git a/src/bin/dhcp4/dhcp4_messages.mes b/src/bin/dhcp4/dhcp4_messages.mes index c1b8b22250..9a8421de92 100644 --- a/src/bin/dhcp4/dhcp4_messages.mes +++ b/src/bin/dhcp4/dhcp4_messages.mes @@ -39,21 +39,6 @@ buffer holding the DHCPv4 message. The arguments specify the source and destination IPv4 addresses as well as the interface over which the buffer has been received. -% DHCP4_BUFFER_WAIT waiting for next DHCPv4 packet with timeout %1 ms -This debug message is issued when the server enters the state when it -waits for new packets. The argument specifies the timeout for the server -to wait for the packet. When this time elapses the server will pass -through its main loop to perform handling of any pending signals -and timers. After that, it will enter the wait state again. - -% DHCP4_BUFFER_WAIT_INTERRUPTED interrupted wait for the next packet due to timeout, signal or external socket callback (timeout value is %1) -This debug message is issued when the server interrupts waiting -for reception of the next DHCPv6 message due to timeout, signal -or reception of the data over socket other than used for DHCPv4 -message transmission. The server will now handle signals -received and ready timers before waiting for next packets again. -The argument specifies the timeout value in milliseconds. - % DHCP4_BUFFER_WAIT_SIGNAL signal received while waiting for next packet, next waiting signal is %1 This debug message is issued when the server was waiting for the packet, but the wait has been interrupted by the signal received diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index dad715662a..75e7b827a7 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -746,7 +746,6 @@ Dhcpv4Srv::run_one() { // because it is important that the select() returns control // frequently so as the IOService can be polled for ready handlers. uint32_t timeout = 1; - LOG_DEBUG(packet4_logger, DBG_DHCP4_DETAIL, DHCP4_BUFFER_WAIT).arg(timeout); query = receivePacket(timeout); // Log if packet has arrived. We can't log the detailed information @@ -763,10 +762,12 @@ Dhcpv4Srv::run_one() { .arg(query->getLocalPort()) .arg(query->getIface()); - } else { - LOG_DEBUG(packet4_logger, DBG_DHCP4_DETAIL, DHCP4_BUFFER_WAIT_INTERRUPTED) - .arg(timeout); } + // We used to log that the wait was interrupted, but this is no longer + // the case. Our wait time is 1s now, so the lack of query packet more + // likely means that nothing new appeared within a second, rather than + // we were interrupted. And we don't want to print a message every + // second. } catch (const SignalInterruptOnSelect) { // Packet reception interrupted because a signal has been received. diff --git a/src/bin/dhcp6/dhcp6_messages.mes b/src/bin/dhcp6/dhcp6_messages.mes index bc542a61e0..f6ece11570 100644 --- a/src/bin/dhcp6/dhcp6_messages.mes +++ b/src/bin/dhcp6/dhcp6_messages.mes @@ -46,21 +46,6 @@ buffer holding the DHCPv6 message. The arguments specify the source and destination addresses as well as the interface over which the buffer has been received. -% DHCP6_BUFFER_WAIT waiting for next DHCPv6 packet with timeout %1 ms -This debug message is issued when the server enters the state when it -waits for new packets. The argument specifies the timeout for the server -to wait for the packet. When this time elapses the server will pass -through its main loop to perform handling of any pending signals -and timers. After that, it will enter the wait state again. - -% DHCP6_BUFFER_WAIT_INTERRUPTED interrupted wait for the next packet due to timeout, signal or external socket callback (timeout value is %1) -This debug message is issued when the server interrupts waiting -for reception of the next DHCPv6 message due to timeout, signal -or reception of the data over socket other than used for DHCPv6 -message transmission. The server will now handle signals -received and ready timers before waiting for next packets again. -The argument specifies the timeout value in milliseconds. - % DHCP6_BUFFER_WAIT_SIGNAL signal received while waiting for next packet, next waiting signal is %1 This debug message is issued when the server was waiting for the packet, but the wait has been interrupted by the signal received diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index 5d8791984b..816d19f85f 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -401,7 +401,6 @@ void Dhcpv6Srv::run_one() { // because it is important that the select() returns control // frequently so as the IOService can be polled for ready handlers. uint32_t timeout = 1; - LOG_DEBUG(packet6_logger, DBG_DHCP6_DETAIL, DHCP6_BUFFER_WAIT).arg(timeout); query = receivePacket(timeout); // Log if packet has arrived. We can't log the detailed information @@ -424,10 +423,13 @@ void Dhcpv6Srv::run_one() { // See processStatsReceived(). StatsMgr::instance().addValue("pkt6-received", static_cast(1)); - } else { - LOG_DEBUG(packet6_logger, DBG_DHCP6_DETAIL, DHCP6_BUFFER_WAIT_INTERRUPTED) - .arg(timeout); } + // We used to log that the wait was interrupted, but this is no longer + // the case. Our wait time is 1s now, so the lack of query packet more + // likely means that nothing new appeared within a second, rather than + // we were interrupted. And we don't want to print a message every + // second. + } catch (const SignalInterruptOnSelect) { // Packet reception interrupted because a signal has been received. -- 2.47.2