Lines Matching +full:pre +full:- +full:multiply

1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (c) 1999-2001 Motorola, Inc.
15 * lksctp developers <linux-sctp@vger.kernel.org>
69 asoc->last_ecne_tsn = lowest_tsn; in sctp_do_ecn_ce_work()
70 asoc->need_ecne = 1; in sctp_do_ecn_ce_work()
101 if (TSN_lt(asoc->last_cwr_tsn, lowest_tsn)) { in sctp_do_ecn_ecne_work()
113 asoc->last_cwr_tsn = lowest_tsn; in sctp_do_ecn_ecne_work()
119 repl = sctp_make_cwr(asoc, asoc->last_cwr_tsn, chunk); in sctp_do_ecn_ecne_work()
131 /* Turn off ECNE getting auto-prepended to every outgoing in sctp_do_ecn_cwr_work()
134 asoc->need_ecne = 0; in sctp_do_ecn_cwr_work()
141 struct sctp_transport *trans = asoc->peer.last_data_from; in sctp_gen_sack()
147 (!trans && (asoc->param_flags & SPP_SACKDELAY_DISABLE)) || in sctp_gen_sack()
148 (trans && (trans->param_flags & SPP_SACKDELAY_DISABLE))) in sctp_gen_sack()
149 asoc->peer.sack_needed = 1; in sctp_gen_sack()
151 ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map); in sctp_gen_sack()
152 max_tsn_seen = sctp_tsnmap_get_max_tsn_seen(&asoc->peer.tsn_map); in sctp_gen_sack()
162 * implement it here anyway. --piggy] in sctp_gen_sack()
165 asoc->peer.sack_needed = 1; in sctp_gen_sack()
175 if (!asoc->peer.sack_needed) { in sctp_gen_sack()
176 asoc->peer.sack_cnt++; in sctp_gen_sack()
185 if (asoc->peer.sack_cnt >= trans->sackfreq - 1) in sctp_gen_sack()
186 asoc->peer.sack_needed = 1; in sctp_gen_sack()
188 asoc->timeouts[SCTP_EVENT_TIMEOUT_SACK] = in sctp_gen_sack()
189 trans->sackdelay; in sctp_gen_sack()
192 if (asoc->peer.sack_cnt >= asoc->sackfreq - 1) in sctp_gen_sack()
193 asoc->peer.sack_needed = 1; in sctp_gen_sack()
195 asoc->timeouts[SCTP_EVENT_TIMEOUT_SACK] = in sctp_gen_sack()
196 asoc->sackdelay; in sctp_gen_sack()
203 __u32 old_a_rwnd = asoc->a_rwnd; in sctp_gen_sack()
205 asoc->a_rwnd = asoc->rwnd; in sctp_gen_sack()
208 asoc->a_rwnd = old_a_rwnd; in sctp_gen_sack()
212 asoc->peer.sack_needed = 0; in sctp_gen_sack()
213 asoc->peer.sack_cnt = 0; in sctp_gen_sack()
224 error = -ENOMEM; in sctp_gen_sack()
228 /* When the T3-RTX timer expires, it calls this function to create the
235 struct sctp_association *asoc = transport->asoc; in sctp_generate_t3_rtx_event()
236 struct sock *sk = asoc->base.sk; in sctp_generate_t3_rtx_event()
247 if (!mod_timer(&transport->T3_rtx_timer, jiffies + (HZ/20))) in sctp_generate_t3_rtx_event()
255 asoc->state, in sctp_generate_t3_rtx_event()
256 asoc->ep, asoc, in sctp_generate_t3_rtx_event()
260 sk->sk_err = -error; in sctp_generate_t3_rtx_event()
273 struct sock *sk = asoc->base.sk; in sctp_generate_timeout_event()
283 if (!mod_timer(&asoc->timers[timeout_type], jiffies + (HZ/20))) in sctp_generate_timeout_event()
291 if (asoc->base.dead) in sctp_generate_timeout_event()
297 asoc->state, asoc->ep, asoc, in sctp_generate_timeout_event()
301 sk->sk_err = -error; in sctp_generate_timeout_event()
370 struct sctp_association *asoc = transport->asoc; in sctp_generate_heartbeat_event()
371 struct sock *sk = asoc->base.sk; in sctp_generate_heartbeat_event()
381 if (!mod_timer(&transport->hb_timer, jiffies + (HZ/20))) in sctp_generate_heartbeat_event()
387 elapsed = jiffies - transport->last_time_sent; in sctp_generate_heartbeat_event()
390 elapsed = timeout - elapsed; in sctp_generate_heartbeat_event()
391 if (!mod_timer(&transport->hb_timer, jiffies + elapsed)) in sctp_generate_heartbeat_event()
398 asoc->state, asoc->ep, asoc, in sctp_generate_heartbeat_event()
402 sk->sk_err = -error; in sctp_generate_heartbeat_event()
416 struct sctp_association *asoc = transport->asoc; in sctp_generate_proto_unreach_event()
417 struct sock *sk = asoc->base.sk; in sctp_generate_proto_unreach_event()
425 if (!mod_timer(&transport->proto_unreach_timer, in sctp_generate_proto_unreach_event()
434 if (asoc->base.dead) in sctp_generate_proto_unreach_event()
439 asoc->state, asoc->ep, asoc, transport, GFP_ATOMIC); in sctp_generate_proto_unreach_event()
446 /* Handle the timeout of the RE-CONFIG timer. */
451 struct sctp_association *asoc = transport->asoc; in sctp_generate_reconf_event()
452 struct sock *sk = asoc->base.sk; in sctp_generate_reconf_event()
461 if (!mod_timer(&transport->reconf_timer, jiffies + (HZ / 20))) in sctp_generate_reconf_event()
467 if (!asoc->strreset_chunk) in sctp_generate_reconf_event()
472 asoc->state, asoc->ep, asoc, in sctp_generate_reconf_event()
476 sk->sk_err = -error; in sctp_generate_reconf_event()
488 struct sctp_association *asoc = transport->asoc; in sctp_generate_probe_event()
489 struct sock *sk = asoc->base.sk; in sctp_generate_probe_event()
498 if (!mod_timer(&transport->probe_timer, jiffies + (HZ / 20))) in sctp_generate_probe_event()
505 asoc->state, asoc->ep, asoc, in sctp_generate_probe_event()
509 sk->sk_err = -error; in sctp_generate_probe_event()
543 * When its peer endpoint is multi-homed, an endpoint should keep a
547 * Each time the T3-rtx timer expires on any address, or when a
572 asoc->overall_error_count++; in sctp_do_8_2_transport_strike()
573 if (transport->state != SCTP_INACTIVE) in sctp_do_8_2_transport_strike()
574 transport->error_count++; in sctp_do_8_2_transport_strike()
575 } else if (transport->hb_sent) { in sctp_do_8_2_transport_strike()
576 if (transport->state != SCTP_UNCONFIRMED) in sctp_do_8_2_transport_strike()
577 asoc->overall_error_count++; in sctp_do_8_2_transport_strike()
578 if (transport->state != SCTP_INACTIVE) in sctp_do_8_2_transport_strike()
579 transport->error_count++; in sctp_do_8_2_transport_strike()
587 if (asoc->base.net->sctp.pf_enable && in sctp_do_8_2_transport_strike()
588 transport->state == SCTP_ACTIVE && in sctp_do_8_2_transport_strike()
589 transport->error_count < transport->pathmaxrxt && in sctp_do_8_2_transport_strike()
590 transport->error_count > transport->pf_retrans) { in sctp_do_8_2_transport_strike()
600 if (transport->state != SCTP_INACTIVE && in sctp_do_8_2_transport_strike()
601 (transport->error_count > transport->pathmaxrxt)) { in sctp_do_8_2_transport_strike()
603 __func__, asoc, &transport->ipaddr.sa); in sctp_do_8_2_transport_strike()
610 if (transport->error_count > transport->ps_retrans && in sctp_do_8_2_transport_strike()
611 asoc->peer.primary_path == transport && in sctp_do_8_2_transport_strike()
612 asoc->peer.active_path != transport) in sctp_do_8_2_transport_strike()
613 sctp_assoc_set_primary(asoc, asoc->peer.active_path); in sctp_do_8_2_transport_strike()
616 * expires, set RTO <- RTO * 2 ("back off the timer"). The in sctp_do_8_2_transport_strike()
624 if (!is_hb || transport->hb_sent) { in sctp_do_8_2_transport_strike()
625 transport->rto = min((transport->rto * 2), transport->asoc->rto_max); in sctp_do_8_2_transport_strike()
649 asoc->outqueue.error = error; in sctp_cmd_init_failed()
665 asoc->stream.si->abort_pd(&asoc->ulpq, GFP_ATOMIC); in sctp_cmd_assoc_failed()
679 if (asoc->overall_error_count >= asoc->max_retrans) { in sctp_cmd_assoc_failed()
690 asoc->outqueue.error = error; in sctp_cmd_assoc_failed()
694 /* Process an init chunk (may be real INIT/INIT-ACK or an embedded INIT
695 * inside the cookie. In reality, this is only used for INIT-ACK processing
708 * case. This is when we process the INIT-ACK. If we in sctp_cmd_process_init()
713 error = -ENOMEM; in sctp_cmd_process_init()
730 list_for_each_entry(t, &asoc->peer.transport_addr_list, transports) in sctp_cmd_hb_timers_start()
741 list_for_each_entry(t, &asoc->peer.transport_addr_list, in sctp_cmd_hb_timers_stop()
743 if (timer_delete(&t->hb_timer)) in sctp_cmd_hb_timers_stop()
748 /* Helper function to stop any pending T3-RTX timers */
754 list_for_each_entry(t, &asoc->peer.transport_addr_list, in sctp_cmd_t3_rtx_timers_stop()
756 if (timer_delete(&t->T3_rtx_timer)) in sctp_cmd_t3_rtx_timers_stop()
775 t->error_count = 0; in sctp_cmd_transport_on()
785 if (t->asoc->state < SCTP_STATE_SHUTDOWN_PENDING) in sctp_cmd_transport_on()
786 t->asoc->overall_error_count = 0; in sctp_cmd_transport_on()
791 t->hb_sent = 0; in sctp_cmd_transport_on()
796 if ((t->state == SCTP_INACTIVE) || (t->state == SCTP_UNCONFIRMED)) { in sctp_cmd_transport_on()
802 if (t->state == SCTP_PF) in sctp_cmd_transport_on()
806 /* HB-ACK was received for a the proper HB. Consider this in sctp_cmd_transport_on()
809 if (t->dst) in sctp_cmd_transport_on()
817 * to re-enable it to properly update the rto. in sctp_cmd_transport_on()
819 if (t->rto_pending == 0) in sctp_cmd_transport_on()
820 t->rto_pending = 1; in sctp_cmd_transport_on()
822 hbinfo = (struct sctp_sender_hb_info *)chunk->skb->data; in sctp_cmd_transport_on()
823 sctp_transport_update_rto(t, (jiffies - hbinfo->sent_at)); in sctp_cmd_transport_on()
828 if (was_unconfirmed && asoc->peer.transport_count == 1) in sctp_cmd_transport_on()
840 if (sctp_outq_sack(&asoc->outqueue, chunk)) { in sctp_cmd_process_sack()
842 err = sctp_do_sm(asoc->base.net, SCTP_EVENT_T_OTHER, in sctp_cmd_process_sack()
844 asoc->state, asoc->ep, asoc, NULL, in sctp_cmd_process_sack()
851 /* Helper function to set the timeout value for T2-SHUTDOWN timer and to set
860 if (chunk->transport) in sctp_cmd_setup_t2()
861 t = chunk->transport; in sctp_cmd_setup_t2()
864 asoc->shutdown_last_sent_to); in sctp_cmd_setup_t2()
865 chunk->transport = t; in sctp_cmd_setup_t2()
867 asoc->shutdown_last_sent_to = t; in sctp_cmd_setup_t2()
868 asoc->timeouts[SCTP_EVENT_TIMEOUT_T2_SHUTDOWN] = t->rto; in sctp_cmd_setup_t2()
876 struct sock *sk = asoc->base.sk; in sctp_cmd_new_state()
878 asoc->state = state; in sctp_cmd_new_state()
883 /* Change the sk->sk_state of a TCP-style socket that has in sctp_cmd_new_state()
893 sk->sk_shutdown |= RCV_SHUTDOWN; in sctp_cmd_new_state()
901 asoc->timeouts[SCTP_EVENT_TIMEOUT_T1_INIT] = in sctp_cmd_new_state()
902 asoc->rto_initial; in sctp_cmd_new_state()
903 asoc->timeouts[SCTP_EVENT_TIMEOUT_T1_COOKIE] = in sctp_cmd_new_state()
904 asoc->rto_initial; in sctp_cmd_new_state()
908 kfree(asoc->peer.cookie); in sctp_cmd_new_state()
909 asoc->peer.cookie = NULL; in sctp_cmd_new_state()
918 if (waitqueue_active(&asoc->wait)) in sctp_cmd_new_state()
919 wake_up_interruptible(&asoc->wait); in sctp_cmd_new_state()
922 * a TCP-style or UDP-style peeled-off socket in in sctp_cmd_new_state()
924 * For a UDP-style socket, the waiters are woken up by the in sctp_cmd_new_state()
928 sk->sk_state_change(sk); in sctp_cmd_new_state()
932 !sctp_outq_is_empty(&asoc->outqueue)) in sctp_cmd_new_state()
933 sctp_outq_uncork(&asoc->outqueue, GFP_ATOMIC); in sctp_cmd_new_state()
940 struct sock *sk = asoc->base.sk; in sctp_cmd_delete_tcb()
942 /* If it is a non-temporary association belonging to a TCP-style in sctp_cmd_delete_tcb()
947 (!asoc->temp) && (sk->sk_shutdown != SHUTDOWN_MASK)) in sctp_cmd_delete_tcb()
955 * A4) Start a T-4 RTO timer, using the RTO value of the selected
965 t = sctp_assoc_choose_alter_transport(asoc, chunk->transport); in sctp_cmd_setup_t4()
966 asoc->timeouts[SCTP_EVENT_TIMEOUT_T4_RTO] = t->rto; in sctp_cmd_setup_t4()
967 chunk->transport = t; in sctp_cmd_setup_t4()
978 while (chunk->chunk_end > chunk->skb->data) { in sctp_cmd_process_operr()
979 err_hdr = (struct sctp_errhdr *)(chunk->skb->data); in sctp_cmd_process_operr()
986 asoc->stream.si->enqueue_event(&asoc->ulpq, ev); in sctp_cmd_process_operr()
988 switch (err_hdr->cause) { in sctp_cmd_process_operr()
994 switch (unk_chunk_hdr->type) { in sctp_cmd_process_operr()
999 * T-4 timer. in sctp_cmd_process_operr()
1002 if (asoc->peer.asconf_capable == 0) in sctp_cmd_process_operr()
1005 asoc->peer.asconf_capable = 0; in sctp_cmd_process_operr()
1020 /* Helper function to remove the association non-primary peer
1029 list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { in sctp_cmd_del_non_primary()
1031 if (!sctp_cmp_addr_exact(&t->ipaddr, in sctp_cmd_del_non_primary()
1032 &asoc->peer.primary_addr)) { in sctp_cmd_del_non_primary()
1038 /* Helper function to set sk_err on a 1-1 style socket. */
1041 struct sock *sk = asoc->base.sk; in sctp_cmd_set_sk_err()
1044 sk->sk_err = error; in sctp_cmd_set_sk_err()
1055 asoc->c.sinit_num_ostreams, in sctp_cmd_assoc_change()
1056 asoc->c.sinit_max_instreams, in sctp_cmd_assoc_change()
1059 asoc->stream.si->enqueue_event(&asoc->ulpq, ev); in sctp_cmd_assoc_change()
1069 asoc->stream.si->enqueue_event(&asoc->ulpq, ev); in sctp_cmd_peer_no_auth()
1081 asoc->stream.si->enqueue_event(&asoc->ulpq, ev); in sctp_cmd_adaptation_ind()
1091 t = asoc->init_last_sent_to; in sctp_cmd_t1_timer_update()
1092 asoc->init_err_counter++; in sctp_cmd_t1_timer_update()
1094 if (t->init_sent_count > (asoc->init_cycle + 1)) { in sctp_cmd_t1_timer_update()
1095 asoc->timeouts[timer] *= 2; in sctp_cmd_t1_timer_update()
1096 if (asoc->timeouts[timer] > asoc->max_init_timeo) { in sctp_cmd_t1_timer_update()
1097 asoc->timeouts[timer] = asoc->max_init_timeo; in sctp_cmd_t1_timer_update()
1099 asoc->init_cycle++; in sctp_cmd_t1_timer_update()
1103 asoc->init_err_counter, asoc->init_cycle, in sctp_cmd_t1_timer_update()
1104 asoc->timeouts[timer]); in sctp_cmd_t1_timer_update()
1118 list_for_each_entry(chunk, &msg->chunks, frag_list) in sctp_cmd_send_msg()
1119 sctp_outq_tail(&asoc->outqueue, chunk, gfp); in sctp_cmd_send_msg()
1121 asoc->outqueue.sched->enqueue(&asoc->outqueue, msg); in sctp_cmd_send_msg()
1130 pr_debug("%s[pre-fn]: ep:%p, %s, %s, asoc:%p[%s], %s\n", __func__, \
1132 asoc, sctp_state_tbl[state], state_fn->name)
1135 pr_debug("%s[post-fn]: asoc:%p, status:%s\n", __func__, asoc, \
1139 pr_debug("%s[post-sfx]: error:%d, asoc:%p[%s]\n", __func__, error, \
1140 asoc, sctp_state_tbl[(asoc && sctp_id2assoc(ep->base.sk, \
1141 sctp_assoc2id(asoc))) ? asoc->state : SCTP_STATE_CLOSED])
1172 status = state_fn->fn(net, ep, asoc, subtype, event_arg, &commands); in sctp_do_sm()
1198 /* FIXME - Most of the dispositions left today would be categorized in sctp_side_effects()
1212 pr_debug("%s: ignored sctp protocol event - state:%d, " in sctp_side_effects()
1221 /* BUG--we should now recover some memory, probably by in sctp_side_effects()
1224 error = -ENOMEM; in sctp_side_effects()
1261 error = -EINVAL; in sctp_side_effects()
1274 /* This is the side-effect interpreter. */
1285 struct sctp_sock *sp = sctp_sk(ep->base.sk); in sctp_cmd_interpreter()
1304 * cmd->handle(x, y, z) in sctp_cmd_interpreter()
1305 * --jgrimm in sctp_cmd_interpreter()
1308 switch (cmd->verb) { in sctp_cmd_interpreter()
1316 sctp_outq_uncork(&asoc->outqueue, gfp); in sctp_cmd_interpreter()
1321 asoc = cmd->obj.asoc; in sctp_cmd_interpreter()
1322 BUG_ON(asoc->peer.primary_path == NULL); in sctp_cmd_interpreter()
1327 sctp_outq_teardown(&asoc->outqueue); in sctp_cmd_interpreter()
1332 sctp_outq_uncork(&asoc->outqueue, gfp); in sctp_cmd_interpreter()
1342 sctp_cmd_new_state(commands, asoc, cmd->obj.state); in sctp_cmd_interpreter()
1347 error = sctp_tsnmap_mark(&asoc->peer.tsn_map, in sctp_cmd_interpreter()
1348 cmd->obj.u32, NULL); in sctp_cmd_interpreter()
1352 asoc->stream.si->report_ftsn(&asoc->ulpq, cmd->obj.u32); in sctp_cmd_interpreter()
1356 asoc->stream.si->handle_ftsn(&asoc->ulpq, in sctp_cmd_interpreter()
1357 cmd->obj.chunk); in sctp_cmd_interpreter()
1366 force = cmd->obj.i32; in sctp_cmd_interpreter()
1373 cmd->obj.chunk); in sctp_cmd_interpreter()
1381 error = -ENOMEM; in sctp_cmd_interpreter()
1391 * Note: Only used during INIT-ACK processing. If in sctp_cmd_interpreter()
1396 cmd->obj.init, gfp); in sctp_cmd_interpreter()
1403 if (cmd->obj.chunk) in sctp_cmd_interpreter()
1404 sctp_chunk_free(cmd->obj.chunk); in sctp_cmd_interpreter()
1405 error = -ENOMEM; in sctp_cmd_interpreter()
1414 if (cmd->obj.chunk) in sctp_cmd_interpreter()
1416 SCTP_CHUNK(cmd->obj.chunk)); in sctp_cmd_interpreter()
1418 if (new_obj->transport) { in sctp_cmd_interpreter()
1419 new_obj->transport->init_sent_count++; in sctp_cmd_interpreter()
1420 asoc->init_last_sent_to = new_obj->transport; in sctp_cmd_interpreter()
1423 /* FIXME - Eventually come up with a cleaner way to in sctp_cmd_interpreter()
1424 * enabling COOKIE-ECHO + DATA bundling during in sctp_cmd_interpreter()
1426 * command plays with asoc->peer.retran_path to in sctp_cmd_interpreter()
1427 * avoid the problem of sending the COOKIE-ECHO and in sctp_cmd_interpreter()
1435 if ((asoc->peer.retran_path != in sctp_cmd_interpreter()
1436 asoc->peer.primary_path) && in sctp_cmd_interpreter()
1437 (asoc->init_err_counter > 0)) { in sctp_cmd_interpreter()
1449 asoc->overall_error_count = 0; in sctp_cmd_interpreter()
1454 error = -ENOMEM; in sctp_cmd_interpreter()
1464 __func__, cmd->obj.chunk, &asoc->ulpq); in sctp_cmd_interpreter()
1466 asoc->stream.si->ulpevent_data(&asoc->ulpq, in sctp_cmd_interpreter()
1467 cmd->obj.chunk, in sctp_cmd_interpreter()
1474 __func__, cmd->obj.ulpevent, &asoc->ulpq); in sctp_cmd_interpreter()
1476 asoc->stream.si->enqueue_event(&asoc->ulpq, in sctp_cmd_interpreter()
1477 cmd->obj.ulpevent); in sctp_cmd_interpreter()
1482 if (!asoc->outqueue.cork) { in sctp_cmd_interpreter()
1483 sctp_outq_cork(&asoc->outqueue); in sctp_cmd_interpreter()
1487 sctp_outq_tail(&asoc->outqueue, cmd->obj.chunk, gfp); in sctp_cmd_interpreter()
1492 packet = cmd->obj.packet; in sctp_cmd_interpreter()
1499 sctp_retransmit(&asoc->outqueue, cmd->obj.transport, in sctp_cmd_interpreter()
1505 sctp_retransmit(&asoc->outqueue, cmd->obj.transport, in sctp_cmd_interpreter()
1511 sctp_do_ecn_ce_work(asoc, cmd->obj.u32); in sctp_cmd_interpreter()
1516 new_obj = sctp_do_ecn_ecne_work(asoc, cmd->obj.u32, in sctp_cmd_interpreter()
1525 sctp_do_ecn_cwr_work(asoc, cmd->obj.u32); in sctp_cmd_interpreter()
1529 sctp_cmd_setup_t2(commands, asoc, cmd->obj.chunk); in sctp_cmd_interpreter()
1533 timer = &asoc->timers[cmd->obj.to]; in sctp_cmd_interpreter()
1540 timer = &asoc->timers[cmd->obj.to]; in sctp_cmd_interpreter()
1541 timeout = asoc->timeouts[cmd->obj.to]; in sctp_cmd_interpreter()
1558 timer = &asoc->timers[cmd->obj.to]; in sctp_cmd_interpreter()
1559 timeout = asoc->timeouts[cmd->obj.to]; in sctp_cmd_interpreter()
1565 timer = &asoc->timers[cmd->obj.to]; in sctp_cmd_interpreter()
1571 chunk = cmd->obj.chunk; in sctp_cmd_interpreter()
1573 asoc->init_last_sent_to); in sctp_cmd_interpreter()
1574 asoc->init_last_sent_to = t; in sctp_cmd_interpreter()
1575 chunk->transport = t; in sctp_cmd_interpreter()
1576 t->init_sent_count++; in sctp_cmd_interpreter()
1584 * timer. Only multiply the timeout by two if in sctp_cmd_interpreter()
1599 * timer. Only multiply the timeout by two if in sctp_cmd_interpreter()
1608 * COOKIE-ECHO we need to resend. in sctp_cmd_interpreter()
1610 list_for_each_entry(t, &asoc->peer.transport_addr_list, in sctp_cmd_interpreter()
1612 sctp_retransmit_mark(&asoc->outqueue, t, in sctp_cmd_interpreter()
1622 sctp_cmd_init_failed(commands, asoc, cmd->obj.u16); in sctp_cmd_interpreter()
1627 subtype, chunk, cmd->obj.u16); in sctp_cmd_interpreter()
1631 asoc->init_err_counter++; in sctp_cmd_interpreter()
1635 asoc->init_err_counter = 0; in sctp_cmd_interpreter()
1636 asoc->init_cycle = 0; in sctp_cmd_interpreter()
1637 list_for_each_entry(t, &asoc->peer.transport_addr_list, in sctp_cmd_interpreter()
1639 t->init_sent_count = 0; in sctp_cmd_interpreter()
1644 sctp_tsnmap_mark_dup(&asoc->peer.tsn_map, in sctp_cmd_interpreter()
1645 cmd->obj.u32); in sctp_cmd_interpreter()
1655 cmd->obj.transport, 0); in sctp_cmd_interpreter()
1659 t = cmd->obj.transport; in sctp_cmd_interpreter()
1664 t = cmd->obj.transport; in sctp_cmd_interpreter()
1667 t->hb_sent = 1; in sctp_cmd_interpreter()
1671 t = cmd->obj.transport; in sctp_cmd_interpreter()
1680 t = cmd->obj.transport; in sctp_cmd_interpreter()
1689 t = cmd->obj.transport; in sctp_cmd_interpreter()
1694 error = cmd->obj.error; in sctp_cmd_interpreter()
1699 sackh.cum_tsn_ack = cmd->obj.be32; in sctp_cmd_interpreter()
1700 sackh.a_rwnd = htonl(asoc->peer.rwnd + in sctp_cmd_interpreter()
1701 asoc->outqueue.outstanding_bytes); in sctp_cmd_interpreter()
1704 chunk->subh.sack_hdr = &sackh; in sctp_cmd_interpreter()
1714 chunk->pdiscard = 1; in sctp_cmd_interpreter()
1716 sctp_outq_uncork(&asoc->outqueue, gfp); in sctp_cmd_interpreter()
1722 t = cmd->obj.transport; in sctp_cmd_interpreter()
1723 t->rto_pending = 1; in sctp_cmd_interpreter()
1727 asoc->stream.si->start_pd(&asoc->ulpq, GFP_ATOMIC); in sctp_cmd_interpreter()
1731 asoc->stream.si->renege_events(&asoc->ulpq, in sctp_cmd_interpreter()
1732 cmd->obj.chunk, in sctp_cmd_interpreter()
1737 sctp_cmd_setup_t4(commands, asoc, cmd->obj.chunk); in sctp_cmd_interpreter()
1744 asoc->peer.i.init_tag = 0; in sctp_cmd_interpreter()
1753 t = asoc->peer.retran_path; in sctp_cmd_interpreter()
1754 asoc->peer.retran_path = asoc->peer.primary_path; in sctp_cmd_interpreter()
1755 sctp_outq_uncork(&asoc->outqueue, gfp); in sctp_cmd_interpreter()
1757 asoc->peer.retran_path = t; in sctp_cmd_interpreter()
1760 sctp_cmd_set_sk_err(asoc, cmd->obj.error); in sctp_cmd_interpreter()
1764 cmd->obj.u8); in sctp_cmd_interpreter()
1778 asoc->peer.i.init_tag = cmd->obj.u32; in sctp_cmd_interpreter()
1781 if (!asoc->outqueue.cork) { in sctp_cmd_interpreter()
1782 sctp_outq_cork(&asoc->outqueue); in sctp_cmd_interpreter()
1785 sctp_cmd_send_msg(asoc, cmd->obj.msg, gfp); in sctp_cmd_interpreter()
1793 sctp_outq_uncork(&asoc->outqueue, gfp); in sctp_cmd_interpreter()
1796 asoc = cmd->obj.asoc; in sctp_cmd_interpreter()
1801 cmd->verb); in sctp_cmd_interpreter()
1808 if (cmd->verb == SCTP_CMD_REPLY) in sctp_cmd_interpreter()
1809 sctp_chunk_free(cmd->obj.chunk); in sctp_cmd_interpreter()
1821 if (chunk->end_of_packet || chunk->singleton) in sctp_cmd_interpreter()
1822 sctp_outq_uncork(&asoc->outqueue, gfp); in sctp_cmd_interpreter()
1824 sctp_outq_uncork(&asoc->outqueue, gfp); in sctp_cmd_interpreter()
1826 if (sp->data_ready_signalled) in sctp_cmd_interpreter()
1827 sp->data_ready_signalled = 0; in sctp_cmd_interpreter()