+76
-87
lines changedFilter options
+76
-87
lines changed Original file line number Diff line number Diff line change
@@ -539,21 +539,10 @@ at that moment.
539
539
540
540
#### msRTT
541
541
542
-
Calculated Round trip time (RTT), in milliseconds. Sender and Receiver. \
543
-
The value is calculated by the receiver based on the incoming ACKACK control packets
544
-
(used by sender to acknowledge ACKs from receiver).
545
-
546
-
The RTT (Round-Trip time) is the sum of two STT (Single-Trip time)
547
-
values, one from agent to peer, and one from peer to agent. Note that **the
548
-
measurement method is different than in TCP**. SRT measures only the "reverse
549
-
RTT", that is, the time measured at the receiver between sending a `UMSG_ACK`
550
-
message until receiving the sender's `UMSG_ACKACK` response message (with the
551
-
same journal). This happens to be a little different from the "forward RTT"
552
-
measured in TCP, which is the time between sending a data packet of a particular
553
-
sequence number and receiving `UMSG_ACK` with a sequence number that is later
554
-
by 1. Forward RTT isn't being measured or reported in SRT, although some
555
-
research works have shown that these values, even though they should be the same,
556
-
happen to differ; "reverse RTT" seems to be more optimistic.
542
+
Smoothed round-trip time (SRTT), an exponentially-weighted moving average (EWMA) of an endpoint's RTT samples, in milliseconds.
543
+
Available both for sender and receiver.
544
+
545
+
See [Section 4.10. Round-Trip Time Estimation](https://tools.ietf.org/html/draft-sharabayko-srt-00#section-4.10) of the [SRT RFC](https://datatracker.ietf.org/doc/html/draft-sharabayko-srt-00) and [[RFC6298] Paxson, V., Allman, M., Chu, J., and M. Sargent, "Computing TCP's Retransmission Timer"](https://datatracker.ietf.org/doc/html/rfc6298) for more details.
557
546
558
547
#### mbpsBandwidth
559
548
Original file line number Diff line number Diff line change
@@ -50,14 +50,14 @@ using namespace std;
50
50
CInfoBlock& CInfoBlock::copyFrom(const CInfoBlock& obj)
51
51
{
52
52
std::copy(obj.m_piIP, obj.m_piIP + 4, m_piIP);
53
-
m_iIPversion = obj.m_iIPversion;
54
-
m_ullTimeStamp = obj.m_ullTimeStamp;
55
-
m_iRTT = obj.m_iRTT;
56
-
m_iBandwidth = obj.m_iBandwidth;
57
-
m_iLossRate = obj.m_iLossRate;
53
+
m_iIPversion = obj.m_iIPversion;
54
+
m_ullTimeStamp = obj.m_ullTimeStamp;
55
+
m_iSRTT = obj.m_iSRTT;
56
+
m_iBandwidth = obj.m_iBandwidth;
57
+
m_iLossRate = obj.m_iLossRate;
58
58
m_iReorderDistance = obj.m_iReorderDistance;
59
-
m_dInterval = obj.m_dInterval;
60
-
m_dCWnd = obj.m_dCWnd;
59
+
m_dInterval = obj.m_dInterval;
60
+
m_dCWnd = obj.m_dCWnd;
61
61
62
62
return *this;
63
63
}
@@ -84,14 +84,14 @@ CInfoBlock* CInfoBlock::clone()
84
84
CInfoBlock* obj = new CInfoBlock;
85
85
86
86
std::copy(m_piIP, m_piIP + 4, obj->m_piIP);
87
-
obj->m_iIPversion = m_iIPversion;
88
-
obj->m_ullTimeStamp = m_ullTimeStamp;
89
-
obj->m_iRTT = m_iRTT;
90
-
obj->m_iBandwidth = m_iBandwidth;
91
-
obj->m_iLossRate = m_iLossRate;
87
+
obj->m_iIPversion = m_iIPversion;
88
+
obj->m_ullTimeStamp = m_ullTimeStamp;
89
+
obj->m_iSRTT = m_iSRTT;
90
+
obj->m_iBandwidth = m_iBandwidth;
91
+
obj->m_iLossRate = m_iLossRate;
92
92
obj->m_iReorderDistance = m_iReorderDistance;
93
-
obj->m_dInterval = m_dInterval;
94
-
obj->m_dCWnd = m_dCWnd;
93
+
obj->m_dInterval = m_dInterval;
94
+
obj->m_dCWnd = m_dCWnd;
95
95
96
96
return obj;
97
97
}
Original file line number Diff line number Diff line change
@@ -235,15 +235,15 @@ template<typename T> class CCache
235
235
class CInfoBlock
236
236
{
237
237
public:
238
-
uint32_t m_piIP[4]; // IP address, machine read only, not human readable format
239
-
int m_iIPversion; // Address family: AF_INET or AF_INET6
240
-
uint64_t m_ullTimeStamp; // last update time
241
-
int m_iRTT; // RTT
242
-
int m_iBandwidth; // estimated bandwidth
243
-
int m_iLossRate; // average loss rate
244
-
int m_iReorderDistance; // packet reordering distance
245
-
double m_dInterval; // inter-packet time, congestion control
246
-
double m_dCWnd; // congestion window size, congestion control
238
+
uint32_t m_piIP[4]; // IP address, machine read only, not human readable format.
239
+
int m_iIPversion; // Address family: AF_INET or AF_INET6.
240
+
uint64_t m_ullTimeStamp; // Last update time.
241
+
int m_iSRTT; // Smoothed RTT.
242
+
int m_iBandwidth; // Estimated link bandwidth.
243
+
int m_iLossRate; // Average loss rate.
244
+
int m_iReorderDistance; // Packet reordering distance.
245
+
double m_dInterval; // Inter-packet time (Congestion Control).
246
+
double m_dCWnd; // Congestion window size (Congestion Control).
247
247
248
248
public:
249
249
CInfoBlock() {} // NOTE: leaves uninitialized
Original file line number Diff line number Diff line change
@@ -284,7 +284,7 @@ enum ETransmissionEvent
284
284
{
285
285
TEV_INIT, // --> After creation, and after any parameters were updated.
286
286
TEV_ACK, // --> When handling UMSG_ACK - older CCC:onAck()
287
-
TEV_ACKACK, // --> UDT does only RTT sync, can be read from CUDT::RTT().
287
+
TEV_ACKACK, // --> UDT does only RTT sync, can be read from CUDT::SRTT().
288
288
TEV_LOSSREPORT, // --> When handling UMSG_LOSSREPORT - older CCC::onLoss()
289
289
TEV_CHECKTIMER, // --> See TEV_CHT_REXMIT
290
290
TEV_SEND, // --> When the packet is scheduled for sending - older CCC::onPktSent
Original file line number Diff line number Diff line change
@@ -358,11 +358,11 @@ class FileCC : public SrtCongestionControlBase
358
358
}
359
359
else
360
360
{
361
-
m_dPktSndPeriod = m_dCWndSize / (m_parent->RTT() + m_iRCInterval);
361
+
m_dPktSndPeriod = m_dCWndSize / (m_parent->SRTT() + m_iRCInterval);
362
362
HLOGC(cclog.Debug, log << "FileCC: UPD (slowstart:ENDED) wndsize="
363
363
<< m_dCWndSize << "/" << m_dMaxCWndSize
364
364
<< " sndperiod=" << m_dPktSndPeriod << "us = wndsize/(RTT+RCIV) RTT="
365
-
<< m_parent->RTT() << " RCIV=" << m_iRCInterval);
365
+
<< m_parent->SRTT() << " RCIV=" << m_iRCInterval);
366
366
}
367
367
}
368
368
else
@@ -374,9 +374,9 @@ class FileCC : public SrtCongestionControlBase
374
374
}
375
375
else
376
376
{
377
-
m_dCWndSize = m_parent->deliveryRate() / 1000000.0 * (m_parent->RTT() + m_iRCInterval) + 16;
377
+
m_dCWndSize = m_parent->deliveryRate() / 1000000.0 * (m_parent->SRTT() + m_iRCInterval) + 16;
378
378
HLOGC(cclog.Debug, log << "FileCC: UPD (speed mode) wndsize="
379
-
<< m_dCWndSize << "/" << m_dMaxCWndSize << " RTT = " << m_parent->RTT()
379
+
<< m_dCWndSize << "/" << m_dMaxCWndSize << " RTT = " << m_parent->SRTT()
380
380
<< " sndperiod=" << m_dPktSndPeriod << "us. deliverRate = "
381
381
<< m_parent->deliveryRate() << " pkts/s)");
382
382
}
@@ -481,17 +481,17 @@ class FileCC : public SrtCongestionControlBase
481
481
}
482
482
else
483
483
{
484
-
m_dPktSndPeriod = m_dCWndSize / (m_parent->RTT() + m_iRCInterval);
484
+
m_dPktSndPeriod = m_dCWndSize / (m_parent->SRTT() + m_iRCInterval);
485
485
HLOGC(cclog.Debug, log << "FileCC: LOSS, SLOWSTART:OFF, sndperiod=" << m_dPktSndPeriod << "us AS wndsize/(RTT+RCIV) (RTT="
486
-
<< m_parent->RTT() << " RCIV=" << m_iRCInterval << ")");
486
+
<< m_parent->SRTT() << " RCIV=" << m_iRCInterval << ")");
487
487
}
488
488
489
489
}
490
490
491
491
m_bLoss = true;
492
492
493
493
// TODO: const int pktsInFlight = CSeqNo::seqoff(m_iLastAck, m_parent->sndSeqNo());
494
-
const int pktsInFlight = m_parent->RTT() / m_dPktSndPeriod;
494
+
const int pktsInFlight = m_parent->SRTT() / m_dPktSndPeriod;
495
495
const int numPktsLost = m_parent->sndLossLength();
496
496
const int lost_pcent_x10 = pktsInFlight > 0 ? (numPktsLost * 1000) / pktsInFlight : 0;
497
497
@@ -581,9 +581,9 @@ class FileCC : public SrtCongestionControlBase
581
581
}
582
582
else
583
583
{
584
-
m_dPktSndPeriod = m_dCWndSize / (m_parent->RTT() + m_iRCInterval);
584
+
m_dPktSndPeriod = m_dCWndSize / (m_parent->SRTT() + m_iRCInterval);
585
585
HLOGC(cclog.Debug, log << "FileCC: CHKTIMER, SLOWSTART:OFF, sndperiod=" << m_dPktSndPeriod << "us AS wndsize/(RTT+RCIV) (wndsize="
586
-
<< setprecision(6) << m_dCWndSize << " RTT=" << m_parent->RTT() << " RCIV=" << m_iRCInterval << ")");
586
+
<< setprecision(6) << m_dCWndSize << " RTT=" << m_parent->SRTT() << " RCIV=" << m_iRCInterval << ")");
587
587
}
588
588
}
589
589
else
Original file line number Diff line number Diff line change
@@ -146,7 +146,7 @@ class SrtCongestionControlBase
146
146
//int m_iMSS; // NOT REQUIRED. Use m_parent->MSS() instead.
147
147
//int32_t m_iSndCurrSeqNo; // NOT REQUIRED. Use m_parent->sndSeqNo().
148
148
//int m_iRcvRate; // NOT REQUIRED. Use m_parent->deliveryRate() instead.
149
-
//int m_RTT; // NOT REQUIRED. Use m_parent->RTT() instead.
149
+
//int m_RTT; // NOT REQUIRED. Use m_parent->SRTT() instead.
150
150
//char* m_pcParam; // Used to access m_llMaxBw. Use m_parent->maxBandwidth() instead.
151
151
152
152
// Constructor in protected section so that this class is semi-abstract.
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4