Lines Matching refs:subflow

401 	struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);  in mptcp_syn_options()  local
406 subflow->snd_isn = TCP_SKB_CB(skb)->end_seq; in mptcp_syn_options()
407 if (subflow->request_mptcp) { in mptcp_syn_options()
413 } else if (subflow->request_join) { in mptcp_syn_options()
414 pr_debug("remote_token=%u, nonce=%u", subflow->remote_token, in mptcp_syn_options()
415 subflow->local_nonce); in mptcp_syn_options()
417 opts->join_id = subflow->local_id; in mptcp_syn_options()
418 opts->token = subflow->remote_token; in mptcp_syn_options()
419 opts->nonce = subflow->local_nonce; in mptcp_syn_options()
420 opts->backup = subflow->request_bkup; in mptcp_syn_options()
443 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); in mptcp_established_options_mp() local
444 struct mptcp_sock *msk = mptcp_sk(subflow->conn); in mptcp_established_options_mp()
459 if (subflow->fully_established || snd_data_fin_enable || in mptcp_established_options_mp()
460 subflow->snd_isn != TCP_SKB_CB(skb)->seq || in mptcp_established_options_mp()
464 if (subflow->mp_capable) { in mptcp_established_options_mp()
474 opts->sndr_key = subflow->local_key; in mptcp_established_options_mp()
475 opts->rcvr_key = subflow->remote_key; in mptcp_established_options_mp()
499 subflow, subflow->local_key, subflow->remote_key, in mptcp_established_options_mp()
503 } else if (subflow->mp_join) { in mptcp_established_options_mp()
505 memcpy(opts->hmac, subflow->hmac, MPTCPOPT_HMAC_LEN); in mptcp_established_options_mp()
507 pr_debug("subflow=%p", subflow); in mptcp_established_options_mp()
515 set_bit(MPTCP_DELEGATE_ACK, &subflow->delegated_status); in mptcp_established_options_mp()
517 mptcp_subflow_delegate(subflow, MPTCP_DELEGATE_ACK); in mptcp_established_options_mp()
523 static void mptcp_write_data_fin(struct mptcp_subflow_context *subflow, in mptcp_write_data_fin() argument
529 u64 data_fin_tx_seq = READ_ONCE(mptcp_sk(subflow->conn)->write_seq) - 1; in mptcp_write_data_fin()
557 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); in mptcp_established_options_dss() local
558 struct mptcp_sock *msk = mptcp_sk(subflow->conn); in mptcp_established_options_dss()
581 mptcp_write_data_fin(subflow, skb, &opts->ext_copy); in mptcp_established_options_dss()
651 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); in mptcp_established_options_add_addr() local
652 struct mptcp_sock *msk = mptcp_sk(subflow->conn); in mptcp_established_options_add_addr()
703 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); in mptcp_established_options_rm_addr() local
704 struct mptcp_sock *msk = mptcp_sk(subflow->conn); in mptcp_established_options_rm_addr()
733 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); in mptcp_established_options_mp_prio() local
738 if (!subflow->send_mp_prio || (opts->suboptions & OPTIONS_MPTCP_MPC)) in mptcp_established_options_mp_prio()
747 opts->backup = subflow->request_bkup; in mptcp_established_options_mp_prio()
759 const struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); in mptcp_established_options_rst() local
766 opts->reset_transient = subflow->reset_transient; in mptcp_established_options_rst()
767 opts->reset_reason = subflow->reset_reason; in mptcp_established_options_rst()
778 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); in mptcp_established_options_fastclose() local
779 struct mptcp_sock *msk = mptcp_sk(subflow->conn); in mptcp_established_options_fastclose()
781 if (likely(!subflow->send_fastclose)) in mptcp_established_options_fastclose()
801 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); in mptcp_established_options_mp_fail() local
803 if (likely(!subflow->send_mp_fail)) in mptcp_established_options_mp_fail()
811 opts->fail_seq = subflow->map_seq; in mptcp_established_options_mp_fail()
823 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); in mptcp_established_options() local
824 struct mptcp_sock *msk = mptcp_sk(subflow->conn); in mptcp_established_options()
920 struct mptcp_subflow_context *subflow, in check_fully_established() argument
927 if (likely(subflow->fully_established)) { in check_fully_established()
932 if (TCP_SKB_CB(skb)->seq == subflow->ssn_offset + 1 && in check_fully_established()
934 subflow->mp_join && (mp_opt->suboptions & OPTIONS_MPTCP_MPJ) && in check_fully_established()
935 !subflow->request_join) in check_fully_established()
945 if (TCP_SKB_CB(skb)->seq != subflow->ssn_offset + 1) { in check_fully_established()
946 if (subflow->mp_join) in check_fully_established()
948 return subflow->mp_capable; in check_fully_established()
956 subflow->fully_established = 1; in check_fully_established()
966 if (subflow->mp_join) in check_fully_established()
968 subflow->mp_capable = 0; in check_fully_established()
979 mptcp_subflow_fully_established(subflow, mp_opt); in check_fully_established()
987 if (likely(subflow->pm_notified) || list_empty(&subflow->node)) in check_fully_established()
990 subflow->pm_notified = 1; in check_fully_established()
991 if (subflow->mp_join) { in check_fully_established()
1099 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); in mptcp_incoming_options() local
1100 struct mptcp_sock *msk = mptcp_sk(subflow->conn); in mptcp_incoming_options()
1110 mptcp_data_lock(subflow->conn); in mptcp_incoming_options()
1112 __mptcp_check_push(subflow->conn, sk); in mptcp_incoming_options()
1113 __mptcp_data_acked(subflow->conn); in mptcp_incoming_options()
1114 mptcp_data_unlock(subflow->conn); in mptcp_incoming_options()
1123 if (!check_fully_established(msk, sk, subflow, skb, &mp_opt)) in mptcp_incoming_options()
1163 subflow->reset_seen = 1; in mptcp_incoming_options()
1164 subflow->reset_reason = mp_opt.reset_reason; in mptcp_incoming_options()
1165 subflow->reset_transient = mp_opt.reset_transient; in mptcp_incoming_options()
1188 sock_hold(subflow->conn); in mptcp_incoming_options()
1204 mptcp_crypto_key_sha(subflow->remote_key, NULL, in mptcp_incoming_options()
1231 struct mptcp_subflow_context *subflow; in mptcp_set_rwin() local
1237 subflow = mptcp_subflow_ctx(ssk); in mptcp_set_rwin()
1238 msk = mptcp_sk(subflow->conn); in mptcp_set_rwin()
1325 struct mptcp_subflow_context *subflow; in mptcp_write_options() local
1559 subflow = mptcp_subflow_ctx(ssk); in mptcp_write_options()
1560 subflow->send_mp_fail = 0; in mptcp_write_options()
1581 subflow = mptcp_subflow_ctx(ssk); in mptcp_write_options()
1582 subflow->send_mp_prio = 0; in mptcp_write_options()