Fix some simulation issues.

Don't default to an infinite queue.
Make sure the computation of missing packets is correct.

R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/49059004

Cr-Commit-Position: refs/heads/master@{#9028}
This commit is contained in:
Stefan Holmer 2015-04-17 15:49:07 +02:00
parent 14a97f0a91
commit a51e8f490c
2 changed files with 3 additions and 2 deletions

View File

@ -239,7 +239,7 @@ void BweTest::RunFairnessTest(BandwidthEstimatorType bwe_type,
ChokeFilter choke(&uplink_, all_flow_ids);
choke.SetCapacity(capacity_kbps);
// choke.SetMaxDelay(1000);
choke.SetMaxDelay(1000);
std::vector<RateCounterFilter*> rate_counters;
for (int flow : all_flow_ids) {

View File

@ -313,7 +313,8 @@ void TcpSender::UpdateCongestionControl(const FeedbackPacket* fb) {
bool TcpSender::LossEvent(const std::vector<uint16_t>& acked_packets) {
uint16_t expected = acked_packets.back() - last_acked_seq_num_;
return expected - static_cast<uint16_t>(acked_packets.size()) > 0;
uint16_t missing = expected - static_cast<uint16_t>(acked_packets.size());
return missing > 0;
}
Packets TcpSender::GeneratePackets(size_t num_packets) {