Commit 14f6eb21 authored by Andreas Schmidt's avatar Andreas Schmidt

Bps instead of bps.

parent 51c616ab
......@@ -30,7 +30,7 @@ void BBR_UpdateBtlBw(BBR* bbr, PrrtRateSample* rs, PrrtPacketTracking* tracking)
} else {
bbr->round_start = false;
}
uint32_t delivery_rate_Bps = (uint32_t)((float) rs->delivery_rate / 8);
uint32_t delivery_rate_Bps = (uint32_t)((float) rs->delivery_rate);
if ((delivery_rate_Bps >= bbr->bw || !rs->is_app_limited) && delivery_rate_Bps != 0) {
bbr->bw = (uint32_t)WindowedFilter_push(bbr->btlBwFilter, delivery_rate_Bps);
debug(DEBUG_BBR, "Current BtlBw: %u, RS delivery rate: %u", bbr->bw, delivery_rate_Bps);
......@@ -165,8 +165,7 @@ void BBR_CheckProbeRTT(BBR *bbr, PrrtPacketTracking *tracking) {
bbr->idle_restart = false;
}
void BBR_UpdateModelAndState(BBR *bbr, PrrtChannelStateInformation *csi, PrrtRateSample *rs,
PrrtPacketTracking *packetTracking, prrtTimedelta_t rtt)
void BBR_UpdateModelAndState(BBR *bbr, PrrtRateSample *rs, PrrtPacketTracking *packetTracking, prrtTimedelta_t rtt)
{
BBR_UpdateBtlBw(bbr, rs, packetTracking);
BBR_CheckCyclePhase(bbr, packetTracking->bytes_lost, packetTracking->prior_inflight);
......@@ -238,7 +237,7 @@ void BBR_SetSendQuantum(BBR* bbr) {
void BBR_OnACK(BBR* bbr, PrrtChannelStateInformation* csi, PrrtRateSample* rs, PrrtPacketTracking* packetTracking, prrtTimedelta_t rtt)
{
check(pthread_mutex_lock(&bbr->lock) == 0, "Lock failed.");
BBR_UpdateModelAndState(bbr, csi, rs, packetTracking, rtt);
BBR_UpdateModelAndState(bbr, rs, packetTracking, rtt);
BBR_SetPacingRate(bbr);
BBR_SetSendQuantum(bbr);
......
......@@ -3,8 +3,6 @@
#include "../util/common.h"
#include "../util/dbg.h"
#include "channelStateInformation.h"
#include "clock.h"
#include "receiver.h"
PrrtChannelStateInformation * PrrtChannelStateInformation_create()
{
......
......@@ -29,7 +29,6 @@ static void handle_feedback(PrrtSocket *prrtSocket, const size_t length)
return;
}
prrtTimestamp_t receiveTime = PrrtClock_get_current_time_us();
n = recvfrom(prrtSocket->feedbackSocketFd, bufin, length, 0, (struct sockaddr *) &remote, &addrlen);
check(n >= 0, "Receiving feedback failed.");
......
......@@ -224,7 +224,7 @@ bool PrrtReceiver_generateRateSample(PrrtRateSample *rateSample, PrrtPacketTrack
if (rateSample->interval != 0) {
// delivered: bytes; interval: us; convert to bps
rateSample->delivery_rate = (uint32_t) round(
(((double) rateSample->delivered) * 1000.0 * 1000.0 * 8.0) / ((double) rateSample->interval));
(((double) rateSample->delivered) * 1000.0 * 1000.0) / ((double) rateSample->interval));
}
debug(DEBUG_FEEDBACK, "RS interval: %u, RS delivered: %u, RS delivery_rate: %u, App Limited: %u", rateSample->interval,
rateSample->delivered, rateSample->delivery_rate, rateSample->is_app_limited);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment