Lines Matching refs:msk
449 struct mptcp_sock *msk = mptcp_sk(subflow->conn); in mptcp_established_options_mp() local
481 opts->csum_reqd = READ_ONCE(msk->csum_enabled); in mptcp_established_options_mp()
562 struct mptcp_sock *msk = mptcp_sk(subflow->conn); in mptcp_established_options_dss() local
569 opts->csum_reqd = READ_ONCE(msk->csum_enabled); in mptcp_established_options_dss()
593 if (!READ_ONCE(msk->can_ack)) { in mptcp_established_options_dss()
598 ack_seq = READ_ONCE(msk->ack_seq); in mptcp_established_options_dss()
599 if (READ_ONCE(msk->use_64bit_ack)) { in mptcp_established_options_dss()
610 WRITE_ONCE(msk->old_wspace, __mptcp_space((struct sock *)msk)); in mptcp_established_options_dss()
655 struct mptcp_sock *msk = mptcp_sk(subflow->conn); in mptcp_established_options_add_addr() local
664 if (!mptcp_pm_should_add_signal(msk) || in mptcp_established_options_add_addr()
666 !mptcp_pm_add_addr_signal(msk, skb, opt_size, remaining, &opts->addr, in mptcp_established_options_add_addr()
692 opts->ahmac = add_addr_generate_hmac(msk->local_key, in mptcp_established_options_add_addr()
693 msk->remote_key, in mptcp_established_options_add_addr()
710 struct mptcp_sock *msk = mptcp_sk(subflow->conn); in mptcp_established_options_rm_addr() local
714 if (!mptcp_pm_should_rm_signal(msk) || in mptcp_established_options_rm_addr()
715 !(mptcp_pm_rm_addr_signal(msk, remaining, &rm_list))) in mptcp_established_options_rm_addr()
785 struct mptcp_sock *msk = mptcp_sk(subflow->conn); in mptcp_established_options_fastclose() local
795 opts->rcvr_key = msk->remote_key; in mptcp_established_options_fastclose()
830 struct mptcp_sock *msk = mptcp_sk(subflow->conn); in mptcp_established_options() local
837 if (unlikely(__mptcp_check_fallback(msk) && !mptcp_check_infinite_map(skb))) in mptcp_established_options()
854 snd_data_fin = mptcp_data_fin_enabled(msk); in mptcp_established_options()
925 static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk, in check_fully_established() argument
977 pr_fallback(msk); in check_fully_established()
983 WRITE_ONCE(msk->pm.remote_deny_join_id0, true); in check_fully_established()
985 if (unlikely(!READ_ONCE(msk->pm.server_side))) in check_fully_established()
989 mptcp_data_lock((struct sock *)msk); in check_fully_established()
990 __mptcp_subflow_fully_established(msk, subflow, mp_opt); in check_fully_established()
991 mptcp_data_unlock((struct sock *)msk); in check_fully_established()
1005 mptcp_pm_subflow_established(msk); in check_fully_established()
1007 mptcp_pm_fully_established(msk, ssk); in check_fully_established()
1032 static void __mptcp_snd_una_update(struct mptcp_sock *msk, u64 new_snd_una) in __mptcp_snd_una_update() argument
1034 msk->bytes_acked += new_snd_una - msk->snd_una; in __mptcp_snd_una_update()
1035 msk->snd_una = new_snd_una; in __mptcp_snd_una_update()
1038 static void ack_update_msk(struct mptcp_sock *msk, in ack_update_msk() argument
1042 u64 new_wnd_end, new_snd_una, snd_nxt = READ_ONCE(msk->snd_nxt); in ack_update_msk()
1043 struct sock *sk = (struct sock *)msk; in ack_update_msk()
1052 old_snd_una = msk->snd_una; in ack_update_msk()
1061 if (after64(new_wnd_end, msk->wnd_end)) in ack_update_msk()
1062 msk->wnd_end = new_wnd_end; in ack_update_msk()
1065 if (after64(msk->wnd_end, READ_ONCE(msk->snd_nxt))) in ack_update_msk()
1069 __mptcp_snd_una_update(msk, new_snd_una); in ack_update_msk()
1076 new_wnd_end, msk->wnd_end); in ack_update_msk()
1079 bool mptcp_update_rcv_data_fin(struct mptcp_sock *msk, u64 data_fin_seq, bool use_64bit) in mptcp_update_rcv_data_fin() argument
1086 if (READ_ONCE(msk->rcv_data_fin)) in mptcp_update_rcv_data_fin()
1089 WRITE_ONCE(msk->rcv_data_fin_seq, in mptcp_update_rcv_data_fin()
1090 mptcp_expand_seq(READ_ONCE(msk->ack_seq), data_fin_seq, use_64bit)); in mptcp_update_rcv_data_fin()
1091 WRITE_ONCE(msk->rcv_data_fin, 1); in mptcp_update_rcv_data_fin()
1096 static bool add_addr_hmac_valid(struct mptcp_sock *msk, in add_addr_hmac_valid() argument
1104 hmac = add_addr_generate_hmac(msk->remote_key, in add_addr_hmac_valid()
1105 msk->local_key, in add_addr_hmac_valid()
1109 msk, hmac, mp_opt->ahmac); in add_addr_hmac_valid()
1118 struct mptcp_sock *msk = mptcp_sk(subflow->conn); in mptcp_incoming_options() local
1122 if (__mptcp_check_fallback(msk)) { in mptcp_incoming_options()
1135 __mptcp_snd_una_update(msk, READ_ONCE(msk->snd_nxt)); in mptcp_incoming_options()
1147 if (!check_fully_established(msk, sk, subflow, skb, &mp_opt)) in mptcp_incoming_options()
1152 msk->local_key == mp_opt.rcvr_key) { in mptcp_incoming_options()
1153 WRITE_ONCE(msk->rcv_fastclose, true); in mptcp_incoming_options()
1154 mptcp_schedule_work((struct sock *)msk); in mptcp_incoming_options()
1159 add_addr_hmac_valid(msk, &mp_opt)) { in mptcp_incoming_options()
1164 mptcp_pm_add_addr_echoed(msk, &mp_opt.addr); in mptcp_incoming_options()
1165 mptcp_pm_del_add_timer(msk, &mp_opt.addr, true); in mptcp_incoming_options()
1174 mptcp_pm_rm_addr_received(msk, &mp_opt.rm_list); in mptcp_incoming_options()
1201 ack_update_msk(msk, sk, &mp_opt); in mptcp_incoming_options()
1210 mptcp_update_rcv_data_fin(msk, mp_opt.data_seq, mp_opt.dsn64)) in mptcp_incoming_options()
1211 mptcp_schedule_work((struct sock *)msk); in mptcp_incoming_options()
1256 struct mptcp_sock *msk; in mptcp_set_rwin() local
1261 msk = mptcp_sk(subflow->conn); in mptcp_set_rwin()
1263 ack_seq = READ_ONCE(msk->ack_seq); in mptcp_set_rwin()
1266 rcv_wnd_old = atomic64_read(&msk->rcv_wnd_sent); in mptcp_set_rwin()
1271 rcv_wnd = atomic64_cmpxchg(&msk->rcv_wnd_sent, rcv_wnd_old, rcv_wnd_new); in mptcp_set_rwin()