Lines Matching refs:asoc

69 	oute = SCTP_SO(&q->asoc->stream, stream)->ext;  in sctp_outq_head_data()
90 oute = SCTP_SO(&q->asoc->stream, stream)->ext; in sctp_outq_tail_data()
191 void sctp_outq_init(struct sctp_association *asoc, struct sctp_outq *q) in sctp_outq_init() argument
195 q->asoc = asoc; in sctp_outq_init()
201 sctp_sched_set_sched(asoc, sctp_sk(asoc->base.sk)->default_ss); in sctp_outq_init()
213 list_for_each_entry(transport, &q->asoc->peer.transport_addr_list, in __sctp_outq_teardown()
270 sctp_outq_init(q->asoc, q); in sctp_outq_teardown()
283 struct net *net = q->asoc->base.net; in sctp_outq_tail()
300 if (chunk->asoc->peer.prsctp_capable && in sctp_outq_tail()
302 chunk->asoc->sent_cnt_removable++; in sctp_outq_tail()
342 static int sctp_prsctp_prune_sent(struct sctp_association *asoc, in sctp_prsctp_prune_sent() argument
358 sctp_insert_list(&asoc->outqueue.abandoned, in sctp_prsctp_prune_sent()
361 streamout = SCTP_SO(&asoc->stream, chk->sinfo.sinfo_stream); in sctp_prsctp_prune_sent()
362 asoc->sent_cnt_removable--; in sctp_prsctp_prune_sent()
363 asoc->abandoned_sent[SCTP_PR_INDEX(PRIO)]++; in sctp_prsctp_prune_sent()
366 if (queue != &asoc->outqueue.retransmit && in sctp_prsctp_prune_sent()
371 asoc->outqueue.outstanding_bytes -= sctp_data_size(chk); in sctp_prsctp_prune_sent()
382 static int sctp_prsctp_prune_unsent(struct sctp_association *asoc, in sctp_prsctp_prune_unsent() argument
385 struct sctp_outq *q = &asoc->outqueue; in sctp_prsctp_prune_unsent()
389 q->sched->unsched_all(&asoc->stream); in sctp_prsctp_prune_unsent()
400 asoc->sent_cnt_removable--; in sctp_prsctp_prune_unsent()
401 asoc->abandoned_unsent[SCTP_PR_INDEX(PRIO)]++; in sctp_prsctp_prune_unsent()
403 sout = SCTP_SO(&asoc->stream, chk->sinfo.sinfo_stream); in sctp_prsctp_prune_unsent()
407 if (asoc->stream.out_curr == sout && in sctp_prsctp_prune_unsent()
409 asoc->stream.out_curr = NULL; in sctp_prsctp_prune_unsent()
417 q->sched->sched_all(&asoc->stream); in sctp_prsctp_prune_unsent()
423 void sctp_prsctp_prune(struct sctp_association *asoc, in sctp_prsctp_prune() argument
428 if (!asoc->peer.prsctp_capable || !asoc->sent_cnt_removable) in sctp_prsctp_prune()
431 msg_len = sctp_prsctp_prune_sent(asoc, sinfo, in sctp_prsctp_prune()
432 &asoc->outqueue.retransmit, in sctp_prsctp_prune()
437 list_for_each_entry(transport, &asoc->peer.transport_addr_list, in sctp_prsctp_prune()
439 msg_len = sctp_prsctp_prune_sent(asoc, sinfo, in sctp_prsctp_prune()
446 sctp_prsctp_prune_unsent(asoc, sinfo, msg_len); in sctp_prsctp_prune()
477 q->asoc->peer.rwnd += sctp_data_size(chunk); in sctp_retransmit_mark()
497 q->asoc->peer.rwnd += sctp_data_size(chunk); in sctp_retransmit_mark()
540 struct net *net = q->asoc->base.net; in sctp_retransmit()
549 if (transport == transport->asoc->peer.retran_path) in sctp_retransmit()
550 sctp_assoc_update_retran_path(transport->asoc); in sctp_retransmit()
551 transport->asoc->rtx_data_chunks += in sctp_retransmit()
552 transport->asoc->unack_data; in sctp_retransmit()
554 transport->asoc->unack_data) in sctp_retransmit()
567 transport->asoc->init_retries++; in sctp_retransmit()
580 q->asoc->stream.si->generate_ftsn(q, q->asoc->ctsn_ack_point); in sctp_retransmit()
725 q->asoc->stats.rtxchunks++; in __sctp_outq_flush_rtx()
770 const struct sctp_association *asoc = transport->asoc; in sctp_packet_singleton() local
771 const __u16 sport = asoc->base.bind_addr.port; in sctp_packet_singleton()
772 const __u16 dport = asoc->peer.port; in sctp_packet_singleton()
773 const __u32 vtag = asoc->peer.i.init_tag; in sctp_packet_singleton()
793 struct sctp_association *asoc; member
820 new_transport = sctp_assoc_lookup_paddr(ctx->asoc, in sctp_outq_select_transport()
828 new_transport = ctx->asoc->peer.active_path; in sctp_outq_select_transport()
853 new_transport = ctx->asoc->peer.active_path; in sctp_outq_select_transport()
870 ctx->asoc->peer.i.init_tag, in sctp_outq_select_transport()
871 ctx->asoc->peer.ecn_capable); in sctp_outq_select_transport()
894 if (ctx->asoc->src_out_of_asoc_ok && in sctp_outq_flush_ctrl()
917 ctx->asoc->base.sk->sk_err = -error; in sctp_outq_flush_ctrl()
920 ctx->asoc->stats.octrlchunks++; in sctp_outq_flush_ctrl()
925 ctx->packet->vtag = ctx->asoc->c.my_vtag; in sctp_outq_flush_ctrl()
948 ctx->asoc->stats.octrlchunks++; in sctp_outq_flush_ctrl()
967 ctx->asoc->stats.octrlchunks++; in sctp_outq_flush_ctrl()
978 if (chunk == ctx->asoc->strreset_chunk) in sctp_outq_flush_ctrl()
996 if (ctx->asoc->peer.retran_path->state == SCTP_UNCONFIRMED) in sctp_outq_flush_rtx()
999 if (ctx->transport != ctx->asoc->peer.retran_path) { in sctp_outq_flush_rtx()
1001 ctx->transport = ctx->asoc->peer.retran_path; in sctp_outq_flush_rtx()
1008 sctp_packet_config(ctx->packet, ctx->asoc->peer.i.init_tag, in sctp_outq_flush_rtx()
1009 ctx->asoc->peer.ecn_capable); in sctp_outq_flush_rtx()
1015 ctx->asoc->base.sk->sk_err = -error; in sctp_outq_flush_rtx()
1044 switch (ctx->asoc->state) { in sctp_outq_flush_data()
1086 __u8 stream_state = SCTP_SO(&ctx->asoc->stream, sid)->state; in sctp_outq_flush_data()
1129 if (ctx->asoc->state == SCTP_STATE_SHUTDOWN_PENDING) in sctp_outq_flush_data()
1132 ctx->asoc->stats.ouodchunks++; in sctp_outq_flush_data()
1134 ctx->asoc->stats.oodchunks++; in sctp_outq_flush_data()
1157 struct sock *sk = ctx->asoc->base.sk; in sctp_outq_flush_transports()
1175 ctx->q->asoc->base.sk->sk_err = -error; in sctp_outq_flush_transports()
1198 .asoc = q->asoc, in sctp_outq_flush()
1214 if (q->asoc->src_out_of_asoc_ok) in sctp_outq_flush()
1250 struct sctp_association *asoc = q->asoc; in sctp_outq_sack() local
1259 struct sctp_transport *primary = asoc->peer.primary_path; in sctp_outq_sack()
1265 transport_list = &asoc->peer.transport_addr_list; in sctp_outq_sack()
1270 trace_sctp_probe_path(transport, asoc); in sctp_outq_sack()
1275 asoc->stats.gapcnt += gap_ack_blocks; in sctp_outq_sack()
1322 if (TSN_lt(asoc->highest_sacked, highest_tsn)) in sctp_outq_sack()
1323 asoc->highest_sacked = highest_tsn; in sctp_outq_sack()
1351 if (TSN_lt(asoc->ctsn_ack_point, sack_ctsn)) { in sctp_outq_sack()
1352 asoc->ctsn_ack_point = sack_ctsn; in sctp_outq_sack()
1358 if (asoc->fast_recovery && accum_moved) in sctp_outq_sack()
1367 sctp_sack_update_unack_data(asoc, sack); in sctp_outq_sack()
1369 ctsn = asoc->ctsn_ack_point; in sctp_outq_sack()
1378 if (asoc->peer.prsctp_capable && in sctp_outq_sack()
1380 asoc->sent_cnt_removable--; in sctp_outq_sack()
1391 asoc->peer.zero_window_announced = !sack_a_rwnd; in sctp_outq_sack()
1399 asoc->peer.rwnd = sack_a_rwnd; in sctp_outq_sack()
1401 asoc->stream.si->generate_ftsn(q, sack_ctsn); in sctp_outq_sack()
1405 "advertised peer ack point:0x%x\n", __func__, asoc, ctsn, in sctp_outq_sack()
1406 asoc->adv_peer_ack_point); in sctp_outq_sack()
1521 q->asoc->peer.primary_path->cacc. in sctp_check_transmitted()
1605 struct sctp_association *asoc = transport->asoc; in sctp_check_transmitted() local
1623 transport->asoc->overall_error_count = 0; in sctp_check_transmitted()
1632 if (asoc->state == SCTP_STATE_SHUTDOWN_PENDING && in sctp_check_transmitted()
1633 del_timer(&asoc->timers in sctp_check_transmitted()
1635 sctp_association_put(asoc); in sctp_check_transmitted()
1644 transport->asoc, in sctp_check_transmitted()
1672 if (!q->asoc->peer.rwnd && in sctp_check_transmitted()
1674 (sack_ctsn+2 == q->asoc->next_tsn) && in sctp_check_transmitted()
1675 q->asoc->state < SCTP_STATE_SHUTDOWN_PENDING) { in sctp_check_transmitted()
1679 q->asoc->overall_error_count = 0; in sctp_check_transmitted()
1718 struct sctp_association *asoc = q->asoc; in sctp_mark_missing() local
1719 struct sctp_transport *primary = asoc->peer.primary_path; in sctp_mark_missing()
1824 struct sctp_association *asoc = q->asoc; in sctp_generate_fwdtsn() local
1833 if (!asoc->peer.prsctp_capable) in sctp_generate_fwdtsn()
1842 if (TSN_lt(asoc->adv_peer_ack_point, ctsn)) in sctp_generate_fwdtsn()
1843 asoc->adv_peer_ack_point = ctsn; in sctp_generate_fwdtsn()
1878 if (TSN_lte(tsn, asoc->adv_peer_ack_point+1)) { in sctp_generate_fwdtsn()
1879 asoc->adv_peer_ack_point = tsn; in sctp_generate_fwdtsn()
1917 if (asoc->adv_peer_ack_point > ctsn) in sctp_generate_fwdtsn()
1918 ftsn_chunk = sctp_make_fwdtsn(asoc, asoc->adv_peer_ack_point, in sctp_generate_fwdtsn()
1923 SCTP_INC_STATS(asoc->base.net, SCTP_MIB_OUTCTRLCHUNKS); in sctp_generate_fwdtsn()