diff --git a/solanaceae/ngc_ft1/flow_only.cpp b/solanaceae/ngc_ft1/flow_only.cpp index a78b6da..ef02f39 100644 --- a/solanaceae/ngc_ft1/flow_only.cpp +++ b/solanaceae/ngc_ft1/flow_only.cpp @@ -99,12 +99,17 @@ void FlowOnly::onAck(std::vector seqs) { if (first_it != _in_flight.cend() && it != first_it) { // not next expected seq -> skip detected - //std::cout << "CONGESTION out of order\n"; - onCongestion(); - it->ignore = true; // only throw once + std::cout << "NGC_FT1 Flow: pkg out of order\n"; + _consecutive_events++; + it->ignore = true; // only handle once + if (_consecutive_events > 4) { // TODO: magic number + std::cout << "CONGESTION! NGC_FT1 flow: pkg out of order\n"; + onCongestion(); + } } else { // only mesure delay, if not a congestion addRTT(now - it->timestamp); + _consecutive_events = 0; } } else { // TOOD: if ! ignore too // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/solanaceae/ngc_ft1/flow_only.hpp b/solanaceae/ngc_ft1/flow_only.hpp index ccc9dde..710b115 100644 --- a/solanaceae/ngc_ft1/flow_only.hpp +++ b/solanaceae/ngc_ft1/flow_only.hpp @@ -42,6 +42,8 @@ struct FlowOnly : public CCAI { std::vector _in_flight; int64_t _in_flight_bytes {0}; + int32_t _consecutive_events {0}; + clock::time_point _time_start_offset; protected: