Lines Matching refs:t
261 bool sctp_transport_pl_send(struct sctp_transport *t) in sctp_transport_pl_send() argument
263 if (t->pl.probe_count < SCTP_MAX_PROBES) in sctp_transport_pl_send()
266 t->pl.last_rtx_chunks = t->asoc->rtx_data_chunks; in sctp_transport_pl_send()
267 t->pl.probe_count = 0; in sctp_transport_pl_send()
268 if (t->pl.state == SCTP_PL_BASE) { in sctp_transport_pl_send()
269 if (t->pl.probe_size == SCTP_BASE_PLPMTU) { /* BASE_PLPMTU Confirmation Failed */ in sctp_transport_pl_send()
270 t->pl.state = SCTP_PL_ERROR; /* Base -> Error */ in sctp_transport_pl_send()
272 t->pl.pmtu = SCTP_BASE_PLPMTU; in sctp_transport_pl_send()
273 t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t); in sctp_transport_pl_send()
274 sctp_assoc_sync_pmtu(t->asoc); in sctp_transport_pl_send()
276 } else if (t->pl.state == SCTP_PL_SEARCH) { in sctp_transport_pl_send()
277 if (t->pl.pmtu == t->pl.probe_size) { /* Black Hole Detected */ in sctp_transport_pl_send()
278 t->pl.state = SCTP_PL_BASE; /* Search -> Base */ in sctp_transport_pl_send()
279 t->pl.probe_size = SCTP_BASE_PLPMTU; in sctp_transport_pl_send()
280 t->pl.probe_high = 0; in sctp_transport_pl_send()
282 t->pl.pmtu = SCTP_BASE_PLPMTU; in sctp_transport_pl_send()
283 t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t); in sctp_transport_pl_send()
284 sctp_assoc_sync_pmtu(t->asoc); in sctp_transport_pl_send()
286 t->pl.probe_high = t->pl.probe_size; in sctp_transport_pl_send()
287 t->pl.probe_size = t->pl.pmtu; in sctp_transport_pl_send()
289 } else if (t->pl.state == SCTP_PL_COMPLETE) { in sctp_transport_pl_send()
290 if (t->pl.pmtu == t->pl.probe_size) { /* Black Hole Detected */ in sctp_transport_pl_send()
291 t->pl.state = SCTP_PL_BASE; /* Search Complete -> Base */ in sctp_transport_pl_send()
292 t->pl.probe_size = SCTP_BASE_PLPMTU; in sctp_transport_pl_send()
294 t->pl.pmtu = SCTP_BASE_PLPMTU; in sctp_transport_pl_send()
295 t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t); in sctp_transport_pl_send()
296 sctp_assoc_sync_pmtu(t->asoc); in sctp_transport_pl_send()
301 if (t->pl.state == SCTP_PL_COMPLETE && t->pl.raise_count < 30 && in sctp_transport_pl_send()
302 !t->pl.probe_count && t->pl.last_rtx_chunks == t->asoc->rtx_data_chunks) { in sctp_transport_pl_send()
303 t->pl.raise_count++; in sctp_transport_pl_send()
308 __func__, t, t->pl.state, t->pl.pmtu, t->pl.probe_size, t->pl.probe_high); in sctp_transport_pl_send()
310 t->pl.probe_count++; in sctp_transport_pl_send()
314 bool sctp_transport_pl_recv(struct sctp_transport *t) in sctp_transport_pl_recv() argument
317 __func__, t, t->pl.state, t->pl.pmtu, t->pl.probe_size, t->pl.probe_high); in sctp_transport_pl_recv()
319 t->pl.last_rtx_chunks = t->asoc->rtx_data_chunks; in sctp_transport_pl_recv()
320 t->pl.pmtu = t->pl.probe_size; in sctp_transport_pl_recv()
321 t->pl.probe_count = 0; in sctp_transport_pl_recv()
322 if (t->pl.state == SCTP_PL_BASE) { in sctp_transport_pl_recv()
323 t->pl.state = SCTP_PL_SEARCH; /* Base -> Search */ 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_ERROR) { in sctp_transport_pl_recv()
326 t->pl.state = SCTP_PL_SEARCH; /* Error -> Search */ in sctp_transport_pl_recv()
328 t->pl.pmtu = t->pl.probe_size; in sctp_transport_pl_recv()
329 t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t); in sctp_transport_pl_recv()
330 sctp_assoc_sync_pmtu(t->asoc); in sctp_transport_pl_recv()
331 t->pl.probe_size += SCTP_PL_BIG_STEP; in sctp_transport_pl_recv()
332 } else if (t->pl.state == SCTP_PL_SEARCH) { in sctp_transport_pl_recv()
333 if (!t->pl.probe_high) { in sctp_transport_pl_recv()
334 t->pl.probe_size = min(t->pl.probe_size + SCTP_PL_BIG_STEP, in sctp_transport_pl_recv()
338 t->pl.probe_size += SCTP_PL_MIN_STEP; in sctp_transport_pl_recv()
339 if (t->pl.probe_size >= t->pl.probe_high) { in sctp_transport_pl_recv()
340 t->pl.probe_high = 0; in sctp_transport_pl_recv()
341 t->pl.raise_count = 0; in sctp_transport_pl_recv()
342 t->pl.state = SCTP_PL_COMPLETE; /* Search -> Search Complete */ in sctp_transport_pl_recv()
344 t->pl.probe_size = t->pl.pmtu; in sctp_transport_pl_recv()
345 t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t); in sctp_transport_pl_recv()
346 sctp_assoc_sync_pmtu(t->asoc); in sctp_transport_pl_recv()
348 } else if (t->pl.state == SCTP_PL_COMPLETE && t->pl.raise_count == 30) { in sctp_transport_pl_recv()
350 t->pl.state = SCTP_PL_SEARCH; /* Search Complete -> Search */ in sctp_transport_pl_recv()
351 t->pl.probe_size += SCTP_PL_MIN_STEP; in sctp_transport_pl_recv()
354 return t->pl.state == SCTP_PL_COMPLETE; in sctp_transport_pl_recv()
357 static bool sctp_transport_pl_toobig(struct sctp_transport *t, u32 pmtu) in sctp_transport_pl_toobig() argument
360 __func__, t, t->pl.state, t->pl.pmtu, t->pl.probe_size, pmtu); in sctp_transport_pl_toobig()
362 if (pmtu < SCTP_MIN_PLPMTU || pmtu >= t->pl.probe_size) in sctp_transport_pl_toobig()
365 if (t->pl.state == SCTP_PL_BASE) { in sctp_transport_pl_toobig()
367 t->pl.state = SCTP_PL_ERROR; /* Base -> Error */ in sctp_transport_pl_toobig()
369 t->pl.pmtu = SCTP_BASE_PLPMTU; in sctp_transport_pl_toobig()
370 t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t); in sctp_transport_pl_toobig()
373 } else if (t->pl.state == SCTP_PL_SEARCH) { in sctp_transport_pl_toobig()
374 if (pmtu >= SCTP_BASE_PLPMTU && pmtu < t->pl.pmtu) { in sctp_transport_pl_toobig()
375 t->pl.state = SCTP_PL_BASE; /* Search -> Base */ in sctp_transport_pl_toobig()
376 t->pl.probe_size = SCTP_BASE_PLPMTU; in sctp_transport_pl_toobig()
377 t->pl.probe_count = 0; in sctp_transport_pl_toobig()
379 t->pl.probe_high = 0; in sctp_transport_pl_toobig()
380 t->pl.pmtu = SCTP_BASE_PLPMTU; in sctp_transport_pl_toobig()
381 t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t); in sctp_transport_pl_toobig()
383 } else if (pmtu > t->pl.pmtu && pmtu < t->pl.probe_size) { in sctp_transport_pl_toobig()
384 t->pl.probe_size = pmtu; in sctp_transport_pl_toobig()
385 t->pl.probe_count = 0; in sctp_transport_pl_toobig()
387 } else if (t->pl.state == SCTP_PL_COMPLETE) { in sctp_transport_pl_toobig()
388 if (pmtu >= SCTP_BASE_PLPMTU && pmtu < t->pl.pmtu) { in sctp_transport_pl_toobig()
389 t->pl.state = SCTP_PL_BASE; /* Complete -> Base */ in sctp_transport_pl_toobig()
390 t->pl.probe_size = SCTP_BASE_PLPMTU; in sctp_transport_pl_toobig()
391 t->pl.probe_count = 0; in sctp_transport_pl_toobig()
393 t->pl.probe_high = 0; in sctp_transport_pl_toobig()
394 t->pl.pmtu = SCTP_BASE_PLPMTU; in sctp_transport_pl_toobig()
395 t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t); in sctp_transport_pl_toobig()
403 bool sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu) in sctp_transport_update_pmtu() argument
405 struct sock *sk = t->asoc->base.sk; in sctp_transport_update_pmtu()
417 if (sctp_transport_pl_enabled(t)) in sctp_transport_update_pmtu()
418 return sctp_transport_pl_toobig(t, pmtu - sctp_transport_pl_hlen(t)); in sctp_transport_update_pmtu()
420 dst = sctp_transport_dst_check(t); in sctp_transport_update_pmtu()
426 pf->to_sk_daddr(&t->ipaddr, sk); in sctp_transport_update_pmtu()
430 dst = sctp_transport_dst_check(t); in sctp_transport_update_pmtu()
434 t->af_specific->get_dst(t, &t->saddr, &t->fl, sk); in sctp_transport_update_pmtu()
435 dst = t->dst; in sctp_transport_update_pmtu()
441 change = t->pathmtu != pmtu; in sctp_transport_update_pmtu()
443 t->pathmtu = pmtu; in sctp_transport_update_pmtu()
758 void sctp_transport_burst_limited(struct sctp_transport *t) in sctp_transport_burst_limited() argument
760 struct sctp_association *asoc = t->asoc; in sctp_transport_burst_limited()
761 u32 old_cwnd = t->cwnd; in sctp_transport_burst_limited()
764 if (t->burst_limited || asoc->max_burst == 0) in sctp_transport_burst_limited()
767 max_burst_bytes = t->flight_size + (asoc->max_burst * asoc->pathmtu); in sctp_transport_burst_limited()
769 t->cwnd = max_burst_bytes; in sctp_transport_burst_limited()
770 t->burst_limited = old_cwnd; in sctp_transport_burst_limited()
777 void sctp_transport_burst_reset(struct sctp_transport *t) in sctp_transport_burst_reset() argument
779 if (t->burst_limited) { in sctp_transport_burst_reset()
780 t->cwnd = t->burst_limited; in sctp_transport_burst_reset()
781 t->burst_limited = 0; in sctp_transport_burst_reset()
799 void sctp_transport_reset(struct sctp_transport *t) in sctp_transport_reset() argument
801 struct sctp_association *asoc = t->asoc; in sctp_transport_reset()
808 t->cwnd = min(4*asoc->pathmtu, max_t(__u32, 2*asoc->pathmtu, 4380)); in sctp_transport_reset()
809 t->burst_limited = 0; in sctp_transport_reset()
810 t->ssthresh = asoc->peer.i.a_rwnd; in sctp_transport_reset()
811 t->rto = asoc->rto_initial; in sctp_transport_reset()
812 sctp_max_rto(asoc, t); in sctp_transport_reset()
813 t->rtt = 0; in sctp_transport_reset()
814 t->srtt = 0; in sctp_transport_reset()
815 t->rttvar = 0; in sctp_transport_reset()
818 t->partial_bytes_acked = 0; in sctp_transport_reset()
819 t->flight_size = 0; in sctp_transport_reset()
820 t->error_count = 0; in sctp_transport_reset()
821 t->rto_pending = 0; in sctp_transport_reset()
822 t->hb_sent = 0; in sctp_transport_reset()
825 t->cacc.changeover_active = 0; in sctp_transport_reset()
826 t->cacc.cycling_changeover = 0; in sctp_transport_reset()
827 t->cacc.next_tsn_at_change = 0; in sctp_transport_reset()
828 t->cacc.cacc_saw_newack = 0; in sctp_transport_reset()
832 void sctp_transport_immediate_rtx(struct sctp_transport *t) in sctp_transport_immediate_rtx() argument
835 if (del_timer(&t->T3_rtx_timer)) in sctp_transport_immediate_rtx()
836 sctp_transport_put(t); in sctp_transport_immediate_rtx()
838 sctp_retransmit(&t->asoc->outqueue, t, SCTP_RTXR_T3_RTX); in sctp_transport_immediate_rtx()
839 if (!timer_pending(&t->T3_rtx_timer)) { in sctp_transport_immediate_rtx()
840 if (!mod_timer(&t->T3_rtx_timer, jiffies + t->rto)) in sctp_transport_immediate_rtx()
841 sctp_transport_hold(t); in sctp_transport_immediate_rtx()
846 void sctp_transport_dst_release(struct sctp_transport *t) in sctp_transport_dst_release() argument
848 dst_release(t->dst); in sctp_transport_dst_release()
849 t->dst = NULL; in sctp_transport_dst_release()
850 t->dst_pending_confirm = 0; in sctp_transport_dst_release()
854 void sctp_transport_dst_confirm(struct sctp_transport *t) in sctp_transport_dst_confirm() argument
856 t->dst_pending_confirm = 1; in sctp_transport_dst_confirm()