Lines Matching refs:t

264 void sctp_transport_pl_send(struct sctp_transport *t)  in sctp_transport_pl_send()  argument
266 if (t->pl.probe_count < SCTP_MAX_PROBES) in sctp_transport_pl_send()
269 t->pl.probe_count = 0; in sctp_transport_pl_send()
270 if (t->pl.state == SCTP_PL_BASE) { in sctp_transport_pl_send()
271 if (t->pl.probe_size == SCTP_BASE_PLPMTU) { /* BASE_PLPMTU Confirmation Failed */ in sctp_transport_pl_send()
272 t->pl.state = SCTP_PL_ERROR; /* Base -> Error */ in sctp_transport_pl_send()
274 t->pl.pmtu = SCTP_BASE_PLPMTU; in sctp_transport_pl_send()
275 t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t); in sctp_transport_pl_send()
276 sctp_assoc_sync_pmtu(t->asoc); in sctp_transport_pl_send()
278 } else if (t->pl.state == SCTP_PL_SEARCH) { in sctp_transport_pl_send()
279 if (t->pl.pmtu == t->pl.probe_size) { /* Black Hole Detected */ in sctp_transport_pl_send()
280 t->pl.state = SCTP_PL_BASE; /* Search -> Base */ in sctp_transport_pl_send()
281 t->pl.probe_size = SCTP_BASE_PLPMTU; in sctp_transport_pl_send()
282 t->pl.probe_high = 0; in sctp_transport_pl_send()
284 t->pl.pmtu = SCTP_BASE_PLPMTU; in sctp_transport_pl_send()
285 t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t); in sctp_transport_pl_send()
286 sctp_assoc_sync_pmtu(t->asoc); in sctp_transport_pl_send()
288 t->pl.probe_high = t->pl.probe_size; in sctp_transport_pl_send()
289 t->pl.probe_size = t->pl.pmtu; in sctp_transport_pl_send()
291 } else if (t->pl.state == SCTP_PL_COMPLETE) { in sctp_transport_pl_send()
292 if (t->pl.pmtu == t->pl.probe_size) { /* Black Hole Detected */ in sctp_transport_pl_send()
293 t->pl.state = SCTP_PL_BASE; /* Search Complete -> Base */ in sctp_transport_pl_send()
294 t->pl.probe_size = SCTP_BASE_PLPMTU; in sctp_transport_pl_send()
296 t->pl.pmtu = SCTP_BASE_PLPMTU; in sctp_transport_pl_send()
297 t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t); in sctp_transport_pl_send()
298 sctp_assoc_sync_pmtu(t->asoc); in sctp_transport_pl_send()
304 __func__, t, t->pl.state, t->pl.pmtu, t->pl.probe_size, t->pl.probe_high); in sctp_transport_pl_send()
305 t->pl.probe_count++; in sctp_transport_pl_send()
308 bool sctp_transport_pl_recv(struct sctp_transport *t) in sctp_transport_pl_recv() argument
311 __func__, t, t->pl.state, t->pl.pmtu, t->pl.probe_size, t->pl.probe_high); in sctp_transport_pl_recv()
313 t->pl.pmtu = t->pl.probe_size; in sctp_transport_pl_recv()
314 t->pl.probe_count = 0; in sctp_transport_pl_recv()
315 if (t->pl.state == SCTP_PL_BASE) { in sctp_transport_pl_recv()
316 t->pl.state = SCTP_PL_SEARCH; /* Base -> Search */ in sctp_transport_pl_recv()
317 t->pl.probe_size += SCTP_PL_BIG_STEP; in sctp_transport_pl_recv()
318 } else if (t->pl.state == SCTP_PL_ERROR) { in sctp_transport_pl_recv()
319 t->pl.state = SCTP_PL_SEARCH; /* Error -> Search */ in sctp_transport_pl_recv()
321 t->pl.pmtu = t->pl.probe_size; in sctp_transport_pl_recv()
322 t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t); in sctp_transport_pl_recv()
323 sctp_assoc_sync_pmtu(t->asoc); in sctp_transport_pl_recv()
324 t->pl.probe_size += SCTP_PL_BIG_STEP; in sctp_transport_pl_recv()
325 } else if (t->pl.state == SCTP_PL_SEARCH) { in sctp_transport_pl_recv()
326 if (!t->pl.probe_high) { in sctp_transport_pl_recv()
327 if (t->pl.probe_size < SCTP_MAX_PLPMTU) { in sctp_transport_pl_recv()
328 t->pl.probe_size = min(t->pl.probe_size + SCTP_PL_BIG_STEP, in sctp_transport_pl_recv()
332 t->pl.probe_high = SCTP_MAX_PLPMTU; in sctp_transport_pl_recv()
334 t->pl.probe_size += SCTP_PL_MIN_STEP; in sctp_transport_pl_recv()
335 if (t->pl.probe_size >= t->pl.probe_high) { in sctp_transport_pl_recv()
336 t->pl.probe_high = 0; in sctp_transport_pl_recv()
337 t->pl.state = SCTP_PL_COMPLETE; /* Search -> Search Complete */ in sctp_transport_pl_recv()
339 t->pl.probe_size = t->pl.pmtu; in sctp_transport_pl_recv()
340 t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t); in sctp_transport_pl_recv()
341 sctp_assoc_sync_pmtu(t->asoc); in sctp_transport_pl_recv()
342 sctp_transport_reset_raise_timer(t); in sctp_transport_pl_recv()
344 } else if (t->pl.state == SCTP_PL_COMPLETE) { in sctp_transport_pl_recv()
346 t->pl.state = SCTP_PL_SEARCH; /* Search Complete -> Search */ in sctp_transport_pl_recv()
347 t->pl.probe_size = min(t->pl.probe_size + SCTP_PL_MIN_STEP, SCTP_MAX_PLPMTU); in sctp_transport_pl_recv()
350 return t->pl.state == SCTP_PL_COMPLETE; in sctp_transport_pl_recv()
353 static bool sctp_transport_pl_toobig(struct sctp_transport *t, u32 pmtu) in sctp_transport_pl_toobig() argument
356 __func__, t, t->pl.state, t->pl.pmtu, t->pl.probe_size, pmtu); in sctp_transport_pl_toobig()
358 if (pmtu < SCTP_MIN_PLPMTU || pmtu >= t->pl.probe_size) in sctp_transport_pl_toobig()
361 if (t->pl.state == SCTP_PL_BASE) { in sctp_transport_pl_toobig()
363 t->pl.state = SCTP_PL_ERROR; /* Base -> Error */ in sctp_transport_pl_toobig()
365 t->pl.pmtu = SCTP_BASE_PLPMTU; in sctp_transport_pl_toobig()
366 t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t); in sctp_transport_pl_toobig()
369 } else if (t->pl.state == SCTP_PL_SEARCH) { in sctp_transport_pl_toobig()
370 if (pmtu >= SCTP_BASE_PLPMTU && pmtu < t->pl.pmtu) { in sctp_transport_pl_toobig()
371 t->pl.state = SCTP_PL_BASE; /* Search -> Base */ in sctp_transport_pl_toobig()
372 t->pl.probe_size = SCTP_BASE_PLPMTU; in sctp_transport_pl_toobig()
373 t->pl.probe_count = 0; in sctp_transport_pl_toobig()
375 t->pl.probe_high = 0; in sctp_transport_pl_toobig()
376 t->pl.pmtu = SCTP_BASE_PLPMTU; in sctp_transport_pl_toobig()
377 t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t); in sctp_transport_pl_toobig()
379 } else if (pmtu > t->pl.pmtu && pmtu < t->pl.probe_size) { in sctp_transport_pl_toobig()
380 t->pl.probe_size = pmtu; in sctp_transport_pl_toobig()
381 t->pl.probe_count = 0; in sctp_transport_pl_toobig()
383 } else if (t->pl.state == SCTP_PL_COMPLETE) { in sctp_transport_pl_toobig()
384 if (pmtu >= SCTP_BASE_PLPMTU && pmtu < t->pl.pmtu) { in sctp_transport_pl_toobig()
385 t->pl.state = SCTP_PL_BASE; /* Complete -> Base */ in sctp_transport_pl_toobig()
386 t->pl.probe_size = SCTP_BASE_PLPMTU; in sctp_transport_pl_toobig()
387 t->pl.probe_count = 0; in sctp_transport_pl_toobig()
389 t->pl.probe_high = 0; in sctp_transport_pl_toobig()
390 t->pl.pmtu = SCTP_BASE_PLPMTU; in sctp_transport_pl_toobig()
391 t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t); in sctp_transport_pl_toobig()
392 sctp_transport_reset_probe_timer(t); in sctp_transport_pl_toobig()
400 bool sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu) in sctp_transport_update_pmtu() argument
402 struct sock *sk = t->asoc->base.sk; in sctp_transport_update_pmtu()
414 if (sctp_transport_pl_enabled(t)) in sctp_transport_update_pmtu()
415 return sctp_transport_pl_toobig(t, pmtu - sctp_transport_pl_hlen(t)); in sctp_transport_update_pmtu()
417 dst = sctp_transport_dst_check(t); in sctp_transport_update_pmtu()
423 pf->to_sk_daddr(&t->ipaddr, sk); in sctp_transport_update_pmtu()
427 dst = sctp_transport_dst_check(t); in sctp_transport_update_pmtu()
431 t->af_specific->get_dst(t, &t->saddr, &t->fl, sk); in sctp_transport_update_pmtu()
432 dst = t->dst; in sctp_transport_update_pmtu()
438 change = t->pathmtu != pmtu; in sctp_transport_update_pmtu()
440 t->pathmtu = pmtu; in sctp_transport_update_pmtu()
755 void sctp_transport_burst_limited(struct sctp_transport *t) in sctp_transport_burst_limited() argument
757 struct sctp_association *asoc = t->asoc; in sctp_transport_burst_limited()
758 u32 old_cwnd = t->cwnd; in sctp_transport_burst_limited()
761 if (t->burst_limited || asoc->max_burst == 0) in sctp_transport_burst_limited()
764 max_burst_bytes = t->flight_size + (asoc->max_burst * asoc->pathmtu); in sctp_transport_burst_limited()
766 t->cwnd = max_burst_bytes; in sctp_transport_burst_limited()
767 t->burst_limited = old_cwnd; in sctp_transport_burst_limited()
774 void sctp_transport_burst_reset(struct sctp_transport *t) in sctp_transport_burst_reset() argument
776 if (t->burst_limited) { in sctp_transport_burst_reset()
777 t->cwnd = t->burst_limited; in sctp_transport_burst_reset()
778 t->burst_limited = 0; in sctp_transport_burst_reset()
796 void sctp_transport_reset(struct sctp_transport *t) in sctp_transport_reset() argument
798 struct sctp_association *asoc = t->asoc; in sctp_transport_reset()
805 t->cwnd = min(4*asoc->pathmtu, max_t(__u32, 2*asoc->pathmtu, 4380)); in sctp_transport_reset()
806 t->burst_limited = 0; in sctp_transport_reset()
807 t->ssthresh = asoc->peer.i.a_rwnd; in sctp_transport_reset()
808 t->rto = asoc->rto_initial; in sctp_transport_reset()
809 sctp_max_rto(asoc, t); in sctp_transport_reset()
810 t->rtt = 0; in sctp_transport_reset()
811 t->srtt = 0; in sctp_transport_reset()
812 t->rttvar = 0; in sctp_transport_reset()
815 t->partial_bytes_acked = 0; in sctp_transport_reset()
816 t->flight_size = 0; in sctp_transport_reset()
817 t->error_count = 0; in sctp_transport_reset()
818 t->rto_pending = 0; in sctp_transport_reset()
819 t->hb_sent = 0; in sctp_transport_reset()
822 t->cacc.changeover_active = 0; in sctp_transport_reset()
823 t->cacc.cycling_changeover = 0; in sctp_transport_reset()
824 t->cacc.next_tsn_at_change = 0; in sctp_transport_reset()
825 t->cacc.cacc_saw_newack = 0; in sctp_transport_reset()
829 void sctp_transport_immediate_rtx(struct sctp_transport *t) in sctp_transport_immediate_rtx() argument
832 if (del_timer(&t->T3_rtx_timer)) in sctp_transport_immediate_rtx()
833 sctp_transport_put(t); in sctp_transport_immediate_rtx()
835 sctp_retransmit(&t->asoc->outqueue, t, SCTP_RTXR_T3_RTX); in sctp_transport_immediate_rtx()
836 if (!timer_pending(&t->T3_rtx_timer)) { in sctp_transport_immediate_rtx()
837 if (!mod_timer(&t->T3_rtx_timer, jiffies + t->rto)) in sctp_transport_immediate_rtx()
838 sctp_transport_hold(t); in sctp_transport_immediate_rtx()
843 void sctp_transport_dst_release(struct sctp_transport *t) in sctp_transport_dst_release() argument
845 dst_release(t->dst); in sctp_transport_dst_release()
846 t->dst = NULL; in sctp_transport_dst_release()
847 t->dst_pending_confirm = 0; in sctp_transport_dst_release()
851 void sctp_transport_dst_confirm(struct sctp_transport *t) in sctp_transport_dst_confirm() argument
853 t->dst_pending_confirm = 1; in sctp_transport_dst_confirm()