| 11886 | } |
| 11887 | |
| 11888 | static void |
| 11889 | bbr_cwnd_limiting(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t in_level) |
| 11890 | { |
| 11891 | if (bbr->rc_filled_pipe && bbr_target_cwnd_mult_limit && (bbr->rc_use_google == 0)) { |
| 11892 | /* |
| 11893 | * Limit the cwnd to not be above N x the target plus whats |
| 11894 | * is outstanding. The target is based on the current b/w |
| 11895 | * estimate. |
| 11896 | */ |
| 11897 | uint32_t target; |
| 11898 | |
| 11899 | target = bbr_get_target_cwnd(bbr, bbr_get_bw(bbr), BBR_UNIT); |
| 11900 | target += ctf_outstanding(tp); |
| 11901 | target *= bbr_target_cwnd_mult_limit; |
| 11902 | if (tp->snd_cwnd > target) |
| 11903 | tp->snd_cwnd = target; |
| 11904 | bbr_log_type_cwndupd(bbr, 0, 0, 0, 10, 0, 0, __LINE__); |
| 11905 | } |
| 11906 | } |
| 11907 | |
| 11908 | static int |
| 11909 | bbr_window_update_needed(struct tcpcb *tp, struct socket *so, uint32_t recwin, int32_t maxseg) |
no test coverage detected