51 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
53 #include <linux/slab.h>
54 #include <linux/types.h>
55 #include <linux/random.h>
100 (
unsigned long)peer);
123 if (!sctp_transport_init(net, transport, addr, gfp))
222 if (!transport->
dst || transport->
dst->obsolete) {
228 if (transport->
dst) {
239 pr_warn(
"%s: Reported pmtu %d too low, using default minimum of %d\n",
250 dst = sctp_transport_dst_check(t);
255 dst->
ops->update_pmtu(dst, sk,
NULL, pmtu);
257 dst = sctp_transport_dst_check(t);
272 af->
get_dst(transport, saddr, &transport->
fl, sctp_opt2sk(opt));
282 if (transport->
dst) {
288 if (asoc && (!asoc->
peer.primary_path ||
289 (transport == asoc->
peer.active_path)))
290 opt->
pf->af->to_sk_saddr(&transport->
saddr,
308 sctp_transport_destroy(transport);
321 struct net *
net = sock_net(tp->
asoc->base.sk);
336 + (rtt >> net->sctp.rto_alpha);
357 if (tp->
rto < tp->
asoc->rto_min)
363 if (tp->
rto > tp->
asoc->rto_max)
374 "rttvar: %d, rto: %ld\n", __func__,
385 __u32 cwnd, ssthresh, flight_size, pba,
pmtu;
387 cwnd = transport->
cwnd;
399 if (TSN_lte(sack_ctsn, transport->
asoc->ctsn_ack_point) ||
400 (flight_size < cwnd))
405 pmtu = transport->
asoc->pathmtu;
407 if (cwnd <= ssthresh) {
425 if (bytes_acked > pmtu)
430 "bytes_acked: %d, cwnd: %d, ssthresh: %d, "
431 "flight_size: %d, pba: %d\n",
433 transport, bytes_acked, cwnd,
434 ssthresh, flight_size, pba);
453 pba = ((cwnd < pba) ? (pba - cwnd) : 0);
456 "transport: %p, bytes_acked: %d, cwnd: %d, "
457 "ssthresh: %d, flight_size: %d, pba: %d\n",
459 transport, bytes_acked, cwnd,
460 ssthresh, flight_size, pba);
463 transport->
cwnd = cwnd;
555 "%d ssthresh: %d\n", __func__,
580 if (max_burst_bytes < old_cwnd) {
581 t->
cwnd = max_burst_bytes;
601 timeout = t->
rto + sctp_jitter(t->
rto);
637 t->
cacc.changeover_active = 0;
638 t->
cacc.cycling_changeover = 0;
639 t->
cacc.next_tsn_at_change = 0;
640 t->
cacc.cacc_saw_newack = 0;