Don't use avgDelay in interleaved mode
The interleaved mode's single packet set MUST always have 0 delay for accurate rate. Before latency code, the interleaved packet set was added implicitly and had 0 delay. Latency code added explicit packet set and used avgDelay for the set. The avgDelay was needed for the original algo used to determine when to send ttag packets. That algo is no longer used (ttag markers are now explicitly configured by AbstractPort). Turbo still needs avgDelay for other use, but changes will be made in Turbo code for that.
This commit is contained in:
parent
bafdd948f8
commit
7fee90313e
@ -715,19 +715,12 @@ int AbstractPort::updatePacketListInterleaved()
|
||||
}
|
||||
} while ((sec < durSec) || ((sec == durSec) && (nsec < durNsec)));
|
||||
|
||||
// XXX: Ideally, for interleaved mode, we have a single packet set and
|
||||
// the set's delay should be 0.
|
||||
// However, Ttag and Turbo both use the set delay field to derive
|
||||
// the set's avg pps (needed for their own functionality), so we set the
|
||||
// avgDelay here instead of 0.
|
||||
long avgDelay = (lastPktTxSec*long(1e9) + lastPktTxNsec
|
||||
+ (durSec - lastPktTxSec)*long(1e9)
|
||||
+ (durNsec - lastPktTxNsec))
|
||||
/totalPkts;
|
||||
loopNextPacketSet(totalPkts, 1, 0, avgDelay);
|
||||
qDebug("Interleaved PacketSet of size %lld, duration %llu.%09llu "
|
||||
"repeat 1 and avg delay %ldns",
|
||||
totalPkts, durSec, durNsec, avgDelay);
|
||||
// XXX: For interleaved mode, we ALWAYS have a single packet set with
|
||||
// one repeat and 0n set loop delay
|
||||
loopNextPacketSet(totalPkts, 1, 0, 0);
|
||||
qDebug("Interleaved single PacketSet of size %lld, duration %llu.%09llu "
|
||||
"repeat 1 and delay 0",
|
||||
totalPkts, durSec, durNsec);
|
||||
|
||||
// Reset working sched/counts before building the packet list
|
||||
sec = nsec = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user