filter simple packet drops by not counting the first 4 packets arriving out of order

This commit is contained in:
Green Sky 2023-09-07 12:26:54 +02:00
parent 1e6929c93b
commit f91780c602
No known key found for this signature in database
2 changed files with 10 additions and 3 deletions

View File

@ -99,12 +99,17 @@ void FlowOnly::onAck(std::vector<SeqIDType> 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
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

View File

@ -42,6 +42,8 @@ struct FlowOnly : public CCAI {
std::vector<FlyingBunch> _in_flight;
int64_t _in_flight_bytes {0};
int32_t _consecutive_events {0};
clock::time_point _time_start_offset;
protected: