| 14239 | } |
| 14240 | |
| 14241 | static void |
| 14242 | bbr_mtu_chg(struct tcpcb *tp) |
| 14243 | { |
| 14244 | struct tcp_bbr *bbr; |
| 14245 | struct bbr_sendmap *rsm, *frsm = NULL; |
| 14246 | uint32_t maxseg; |
| 14247 | |
| 14248 | /* |
| 14249 | * The MTU has changed. a) Clear the sack filter. b) Mark everything |
| 14250 | * over the current size as SACK_PASS so a retransmit will occur. |
| 14251 | */ |
| 14252 | |
| 14253 | bbr = (struct tcp_bbr *)tp->t_fb_ptr; |
| 14254 | maxseg = tp->t_maxseg - bbr->rc_last_options; |
| 14255 | sack_filter_clear(&bbr->r_ctl.bbr_sf, tp->snd_una); |
| 14256 | TAILQ_FOREACH(rsm, &bbr->r_ctl.rc_map, r_next) { |
| 14257 | /* Don't mess with ones acked (by sack?) */ |
| 14258 | if (rsm->r_flags & BBR_ACKED) |
| 14259 | continue; |
| 14260 | if ((rsm->r_end - rsm->r_start) > maxseg) { |
| 14261 | /* |
| 14262 | * We mark sack-passed on all the previous large |
| 14263 | * sends we did. This will force them to retransmit. |
| 14264 | */ |
| 14265 | rsm->r_flags |= BBR_SACK_PASSED; |
| 14266 | if (((rsm->r_flags & BBR_MARKED_LOST) == 0) && |
| 14267 | bbr_is_lost(bbr, rsm, bbr->r_ctl.rc_rcvtime)) { |
| 14268 | bbr->r_ctl.rc_lost_bytes += rsm->r_end - rsm->r_start; |
| 14269 | bbr->r_ctl.rc_lost += rsm->r_end - rsm->r_start; |
| 14270 | rsm->r_flags |= BBR_MARKED_LOST; |
| 14271 | } |
| 14272 | if (frsm == NULL) |
| 14273 | frsm = rsm; |
| 14274 | } |
| 14275 | } |
| 14276 | if (frsm) { |
| 14277 | bbr->r_ctl.rc_resend = frsm; |
| 14278 | } |
| 14279 | } |
| 14280 | |
| 14281 | /* |
| 14282 | * bbr_ctloutput() must drop the inpcb lock before performing copyin on |
nothing calls this directly
no test coverage detected