| 3213 | } |
| 3214 | |
| 3215 | static void |
| 3216 | rack_update_multiplier(struct tcp_rack *rack, int32_t timely_says, uint64_t last_bw_est, |
| 3217 | uint32_t rtt, int32_t rtt_diff) |
| 3218 | { |
| 3219 | uint64_t cur_bw, up_bnd, low_bnd, subfr; |
| 3220 | uint32_t losses; |
| 3221 | |
| 3222 | if ((rack->rc_gp_dyn_mul == 0) || |
| 3223 | (rack->use_fixed_rate) || |
| 3224 | (rack->in_probe_rtt) || |
| 3225 | (rack->rc_always_pace == 0)) { |
| 3226 | /* No dynamic GP multipler in play */ |
| 3227 | return; |
| 3228 | } |
| 3229 | losses = rack->r_ctl.rc_loss_count - rack->r_ctl.rc_loss_at_start; |
| 3230 | cur_bw = rack_get_bw(rack); |
| 3231 | /* Calculate our up and down range */ |
| 3232 | up_bnd = rack->r_ctl.last_gp_comp_bw * (uint64_t)rack_gp_per_bw_mul_up; |
| 3233 | up_bnd /= 100; |
| 3234 | up_bnd += rack->r_ctl.last_gp_comp_bw; |
| 3235 | |
| 3236 | subfr = (uint64_t)rack->r_ctl.last_gp_comp_bw * (uint64_t)rack_gp_per_bw_mul_down; |
| 3237 | subfr /= 100; |
| 3238 | low_bnd = rack->r_ctl.last_gp_comp_bw - subfr; |
| 3239 | if ((timely_says == 2) && (rack->r_ctl.rc_no_push_at_mrtt)) { |
| 3240 | /* |
| 3241 | * This is the case where our RTT is above |
| 3242 | * the max target and we have been configured |
| 3243 | * to just do timely no bonus up stuff in that case. |
| 3244 | * |
| 3245 | * There are two configurations, set to 1, and we |
| 3246 | * just do timely if we are over our max. If its |
| 3247 | * set above 1 then we slam the multipliers down |
| 3248 | * to 100 and then decrement per timely. |
| 3249 | */ |
| 3250 | rack_log_timely(rack, timely_says, cur_bw, low_bnd, up_bnd, |
| 3251 | __LINE__, 3); |
| 3252 | if (rack->r_ctl.rc_no_push_at_mrtt > 1) |
| 3253 | rack_validate_multipliers_at_or_below_100(rack); |
| 3254 | rack_decrease_bw_mul(rack, timely_says, rtt, rtt_diff); |
| 3255 | } else if ((last_bw_est < low_bnd) && !losses) { |
| 3256 | /* |
| 3257 | * We are decreasing this is a bit complicated this |
| 3258 | * means we are loosing ground. This could be |
| 3259 | * because another flow entered and we are competing |
| 3260 | * for b/w with it. This will push the RTT up which |
| 3261 | * makes timely unusable unless we want to get shoved |
| 3262 | * into a corner and just be backed off (the age |
| 3263 | * old problem with delay based CC). |
| 3264 | * |
| 3265 | * On the other hand if it was a route change we |
| 3266 | * would like to stay somewhat contained and not |
| 3267 | * blow out the buffers. |
| 3268 | */ |
| 3269 | rack_log_timely(rack, timely_says, cur_bw, low_bnd, up_bnd, |
| 3270 | __LINE__, 3); |
| 3271 | rack->r_ctl.last_gp_comp_bw = cur_bw; |
| 3272 | if (rack->rc_gp_bwred == 0) { |
no test coverage detected