Skip to content

Commit

Permalink
Update for fractional congestion window
Browse files Browse the repository at this point in the history
  • Loading branch information
minuscat committed May 16, 2024
1 parent da73e6f commit dc111c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/ipv4/tcp_prague.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ static void prague_update_cwnd(struct sock *sk, const struct rate_sample *rs)
struct tcp_sock *tp = tcp_sk(sk);
u64 increase;
s64 acked;
u32 new_cwnd;
u64 new_cwnd;
u64 divisor;
u64 mtu_used;

Expand Down Expand Up @@ -589,9 +589,9 @@ static void prague_update_cwnd(struct sock *sk, const struct rate_sample *rs)
ca->frac_cwnd = max_t(u64, ca->frac_cwnd + acked, prague_pacing_rate_to_frac_cwnd(sk));
} else {
increase = acked * ca->ai_ack_increase;
new_cwnd = tp->snd_cwnd;
new_cwnd = ca->frac_cwnd;
if (likely(new_cwnd))
increase = div_u64(increase + (new_cwnd >> 1), new_cwnd);
increase = div64_u64((increase << CWND_UNIT) + (new_cwnd >> 1), new_cwnd);
ca->frac_cwnd += max_t(u64, acked, increase);
}

Expand Down

0 comments on commit dc111c5

Please sign in to comment.