summaryrefslogtreecommitdiff
path: root/netcon/NetconEthernetTap.cpp
diff options
context:
space:
mode:
authorJoseph Henry <joseph.henry@zerotier.com>2015-10-08 17:55:58 -0400
committerJoseph Henry <joseph.henry@zerotier.com>2015-10-08 17:55:58 -0400
commitbbfc9359e9828931c833f80739dd43d3d4f3e973 (patch)
tree8c6388f36e8d56b717957871c608af41f17c11c2 /netcon/NetconEthernetTap.cpp
parent1bc33ae8d78cf97f96028d0e46e916d71b995f7f (diff)
downloadinfinitytier-bbfc9359e9828931c833f80739dd43d3d4f3e973.tar.gz
infinitytier-bbfc9359e9828931c833f80739dd43d3d4f3e973.zip
Minor timer changes (~21 Mb/s local)
Diffstat (limited to 'netcon/NetconEthernetTap.cpp')
-rw-r--r--netcon/NetconEthernetTap.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/netcon/NetconEthernetTap.cpp b/netcon/NetconEthernetTap.cpp
index 0b5b0727..538ae0be 100644
--- a/netcon/NetconEthernetTap.cpp
+++ b/netcon/NetconEthernetTap.cpp
@@ -307,7 +307,7 @@ void NetconEthernetTap::closeAll()
closeConnection(tcp_connections.front());
}
-#define ZT_LWIP_TCP_TIMER_INTERVAL 5
+#define ZT_LWIP_TCP_TIMER_INTERVAL 1
void NetconEthernetTap::threadMain()
throw()
@@ -344,6 +344,7 @@ void NetconEthernetTap::threadMain()
if (since_tcp >= ZT_LWIP_TCP_TIMER_INTERVAL) {
prev_tcp_time = now;
lwipstack->tcp_tmr();
+ //fprintf(stderr, "tcp_tmr\n");
} else {
tcp_remaining = ZT_LWIP_TCP_TIMER_INTERVAL - since_tcp;
}
@@ -353,6 +354,7 @@ void NetconEthernetTap::threadMain()
} else {
etharp_remaining = ARP_TMR_INTERVAL - since_etharp;
}
+ //fprintf(stderr, "poll_wait_time = %d\n", (unsigned long)std::min(tcp_remaining,etharp_remaining));
_phy.poll((unsigned long)std::min(tcp_remaining,etharp_remaining));
}
closeAll();
@@ -399,6 +401,7 @@ void NetconEthernetTap::phyOnFileDescriptorActivity(PhySocket *sock,void **uptr,
now space on the buffer */
if(sndbuf == 0) {
_phy.setNotifyReadable(sock, false);
+ lwipstack->_tcp_output(conn->pcb);
return;
}