Skip to content

Commit

Permalink
Remove extra debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
xguerin committed Nov 14, 2023
1 parent d68d1af commit 46f9f41
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 21 deletions.
2 changes: 1 addition & 1 deletion include/tulips/stack/TCPv4.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ static constexpr size_t USED HEADER_LEN = sizeof(Header);
static constexpr uint16_t USED HEADER_OVERHEAD = ipv4::HEADER_LEN + HEADER_LEN;

static constexpr uint16_t USED ATO = 40;
static constexpr uint8_t USED RTO = 3;
static constexpr uint16_t USED KTO = 5;
static constexpr uint8_t USED RTO = 3;

}

Expand Down
16 changes: 0 additions & 16 deletions include/tulips/stack/tcpv4/Processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,22 +253,6 @@ class Processor : public transport::Processor
*/
Status sendAck(Connection& e, const bool k);

/**
* Send a keep-alive probe.
*
* @param e the connection to keep-alive.
* @param s the segment to use.
*
* @return the status of the operation.
*/
inline Status sendKeepAlive(Connection& e, Segment& s)
{
uint8_t* outdata = s.m_dat;
OUTTCP->flags = Flag::ACK;
OUTTCP->offset = 5;
return send(e, HEADER_LEN, s);
}

/**
* Respond to a connection request.
*
Expand Down
2 changes: 0 additions & 2 deletions src/stack/tcpv4/Processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,10 @@ Processor::onSlowTimer()
* Handle keep-alive.
*/
if (e.m_state == Connection::ESTABLISHED && HAS_KEEP_ALIVE(e)) {
m_log.debug("TCP4", "<", e.id(), "> check keep-alive");
/*
* Reset the live flag.
*/
if (e.m_live) {
m_log.debug("TCP4", "<", e.id(), "> reset the live flag");
e.m_live = false;
e.m_ktm = KTO + 1;
continue;
Expand Down
4 changes: 2 additions & 2 deletions tests/tcp/keepalive.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "tulips/stack/TCPv4.h"
#include "tulips/stack/tcpv4/Connection.h"
#include <tulips/stack/TCPv4.h>
#include <tulips/stack/ethernet/Processor.h>
#include <tulips/stack/ethernet/Producer.h>
#include <tulips/stack/ipv4/Processor.h>
#include <tulips/stack/ipv4/Producer.h>
#include <tulips/stack/tcpv4/Connection.h>
#include <tulips/stack/tcpv4/Processor.h>
#include <tulips/system/Compiler.h>
#include <tulips/system/Logger.h>
Expand Down

0 comments on commit 46f9f41

Please sign in to comment.