Lines Matching refs:subflow
50 if (!msk->subflow || READ_ONCE(msk->can_ack)) in __mptcp_nmpc_socket()
53 return msk->subflow; in __mptcp_nmpc_socket()
92 struct mptcp_subflow_context *subflow; in __mptcp_socket_create() local
102 msk->subflow = ssock; in __mptcp_socket_create()
103 subflow = mptcp_subflow_ctx(ssock->sk); in __mptcp_socket_create()
104 list_add(&subflow->node, &msk->conn_list); in __mptcp_socket_create()
105 subflow->request_mptcp = 1; in __mptcp_socket_create()
268 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk); in __mptcp_move_skb() local
292 MPTCP_SKB_CB(skb)->map_seq = mptcp_subflow_get_mapped_dsn(subflow); in __mptcp_move_skb()
415 struct mptcp_subflow_context *subflow; in mptcp_check_data_fin() local
442 mptcp_for_each_subflow(msk, subflow) { in mptcp_check_data_fin()
443 struct sock *ssk = mptcp_subflow_tcp_sock(subflow); in mptcp_check_data_fin()
464 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk); in __mptcp_move_skbs_from_subflow() local
482 map_remaining = subflow->map_data_len - in __mptcp_move_skbs_from_subflow()
483 mptcp_subflow_get_map_offset(subflow); in __mptcp_move_skbs_from_subflow()
502 subflow->map_data_len = skb->len; in __mptcp_move_skbs_from_subflow()
625 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk); in mptcp_data_ready() local
633 wake = subflow->data_avail == MPTCP_SUBFLOW_DATA_AVAIL; in mptcp_data_ready()
708 struct mptcp_subflow_context *subflow; in mptcp_check_for_eof() local
712 mptcp_for_each_subflow(msk, subflow) in mptcp_check_for_eof()
713 receivers += !subflow->rx_eof; in mptcp_check_for_eof()
739 struct mptcp_subflow_context *subflow; in mptcp_subflow_recv_lookup() local
744 mptcp_for_each_subflow(msk, subflow) { in mptcp_subflow_recv_lookup()
745 if (subflow->data_avail) in mptcp_subflow_recv_lookup()
746 return mptcp_subflow_tcp_sock(subflow); in mptcp_subflow_recv_lookup()
794 struct mptcp_subflow_context *subflow; in mptcp_is_writeable() local
799 mptcp_for_each_subflow(msk, subflow) { in mptcp_is_writeable()
800 if (sk_stream_is_writeable(subflow->tcp_sock)) in mptcp_is_writeable()
1049 struct mptcp_subflow_context *subflow; in mptcp_nospace() local
1054 mptcp_for_each_subflow(msk, subflow) { in mptcp_nospace()
1055 struct sock *ssk = mptcp_subflow_tcp_sock(subflow); in mptcp_nospace()
1064 static bool mptcp_subflow_active(struct mptcp_subflow_context *subflow) in mptcp_subflow_active() argument
1066 struct sock *ssk = mptcp_subflow_tcp_sock(subflow); in mptcp_subflow_active()
1069 if (subflow->request_join && !subflow->fully_established) in mptcp_subflow_active()
1091 struct mptcp_subflow_context *subflow; in mptcp_subflow_get_send() local
1114 mptcp_for_each_subflow(msk, subflow) { in mptcp_subflow_get_send()
1115 ssk = mptcp_subflow_tcp_sock(subflow); in mptcp_subflow_get_send()
1126 mptcp_for_each_subflow(msk, subflow) { in mptcp_subflow_get_send()
1127 ssk = mptcp_subflow_tcp_sock(subflow); in mptcp_subflow_get_send()
1128 if (!mptcp_subflow_active(subflow)) in mptcp_subflow_get_send()
1131 nr_active += !subflow->backup; in mptcp_subflow_get_send()
1133 if (!sk_stream_memory_free(subflow->tcp_sock)) in mptcp_subflow_get_send()
1142 if (ratio < send_info[subflow->backup].ratio) { in mptcp_subflow_get_send()
1143 send_info[subflow->backup].ssk = ssk; in mptcp_subflow_get_send()
1144 send_info[subflow->backup].ratio = ratio; in mptcp_subflow_get_send()
1383 struct mptcp_subflow_context *subflow; in mptcp_rcv_space_adjust() local
1403 mptcp_for_each_subflow(msk, subflow) { in mptcp_rcv_space_adjust()
1408 tp = tcp_sk(mptcp_subflow_tcp_sock(subflow)); in mptcp_rcv_space_adjust()
1455 mptcp_for_each_subflow(msk, subflow) { in mptcp_rcv_space_adjust()
1459 ssk = mptcp_subflow_tcp_sock(subflow); in mptcp_rcv_space_adjust()
1644 struct mptcp_subflow_context *subflow; in mptcp_subflow_get_retrans() local
1652 mptcp_for_each_subflow(msk, subflow) { in mptcp_subflow_get_retrans()
1653 struct sock *ssk = mptcp_subflow_tcp_sock(subflow); in mptcp_subflow_get_retrans()
1655 if (!mptcp_subflow_active(subflow)) in mptcp_subflow_get_retrans()
1665 if (subflow->backup) { in mptcp_subflow_get_retrans()
1686 struct mptcp_subflow_context *subflow, in __mptcp_close_ssk() argument
1691 list_del(&subflow->node); in __mptcp_close_ssk()
1736 struct mptcp_subflow_context *subflow, *tmp; in __mptcp_close_subflow() local
1738 list_for_each_entry_safe(subflow, tmp, &msk->conn_list, node) { in __mptcp_close_subflow()
1739 struct sock *ssk = mptcp_subflow_tcp_sock(subflow); in __mptcp_close_subflow()
1744 __mptcp_close_ssk((struct sock *)msk, ssk, subflow, 0); in __mptcp_close_subflow()
1957 struct mptcp_subflow_context *subflow, *tmp; in mptcp_close() local
1978 mptcp_for_each_subflow(msk, subflow) { in mptcp_close()
1979 struct sock *tcp_sk = mptcp_subflow_tcp_sock(subflow); in mptcp_close()
2003 list_for_each_entry_safe(subflow, tmp, &conn_list, node) { in mptcp_close()
2004 struct sock *ssk = mptcp_subflow_tcp_sock(subflow); in mptcp_close()
2005 __mptcp_close_ssk(sk, ssk, subflow, timeout); in mptcp_close()
2128 msk->subflow = NULL; in mptcp_sk_clone()
2189 struct mptcp_subflow_context *subflow; in mptcp_accept() local
2193 subflow = mptcp_subflow_ctx(newsk); in mptcp_accept()
2194 new_mptcp_sock = subflow->conn; in mptcp_accept()
2214 list_add(&subflow->node, &msk->conn_list); in mptcp_accept()
2467 struct mptcp_subflow_context *subflow; in mptcp_finish_connect() local
2472 subflow = mptcp_subflow_ctx(ssk); in mptcp_finish_connect()
2473 sk = subflow->conn; in mptcp_finish_connect()
2476 pr_debug("msk=%p, token=%u", sk, subflow->token); in mptcp_finish_connect()
2478 mptcp_crypto_key_sha(subflow->remote_key, NULL, &ack_seq); in mptcp_finish_connect()
2480 subflow->map_seq = ack_seq; in mptcp_finish_connect()
2481 subflow->map_subflow_seq = 1; in mptcp_finish_connect()
2486 WRITE_ONCE(msk->remote_key, subflow->remote_key); in mptcp_finish_connect()
2487 WRITE_ONCE(msk->local_key, subflow->local_key); in mptcp_finish_connect()
2488 WRITE_ONCE(msk->write_seq, subflow->idsn + 1); in mptcp_finish_connect()
2509 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); in mptcp_finish_join() local
2510 struct mptcp_sock *msk = mptcp_sk(subflow->conn); in mptcp_finish_join()
2515 pr_debug("msk=%p, subflow=%p", msk, subflow); in mptcp_finish_join()
2534 if (ret && !WARN_ON_ONCE(!list_empty(&subflow->node))) in mptcp_finish_join()
2535 list_add_tail(&subflow->node, &msk->join_list); in mptcp_finish_join()
2546 subflow->map_seq = READ_ONCE(msk->ack_seq); in mptcp_finish_join()
2609 struct mptcp_subflow_context *subflow) in mptcp_subflow_early_fallback() argument
2611 subflow->request_mptcp = 0; in mptcp_subflow_early_fallback()
2619 struct mptcp_subflow_context *subflow; in mptcp_stream_connect() local
2624 if (sock->state != SS_UNCONNECTED && msk->subflow) { in mptcp_stream_connect()
2628 ssock = msk->subflow; in mptcp_stream_connect()
2640 subflow = mptcp_subflow_ctx(ssock->sk); in mptcp_stream_connect()
2646 mptcp_subflow_early_fallback(msk, subflow); in mptcp_stream_connect()
2648 if (subflow->request_mptcp && mptcp_token_new_connect(ssock->sk)) in mptcp_stream_connect()
2649 mptcp_subflow_early_fallback(msk, subflow); in mptcp_stream_connect()
2721 struct mptcp_subflow_context *subflow; in mptcp_stream_accept() local
2727 mptcp_for_each_subflow(msk, subflow) { in mptcp_stream_accept()
2728 struct sock *ssk = mptcp_subflow_tcp_sock(subflow); in mptcp_stream_accept()
2781 struct mptcp_subflow_context *subflow; in mptcp_shutdown() local
2807 mptcp_for_each_subflow(msk, subflow) { in mptcp_shutdown()
2808 struct sock *tcp_sk = mptcp_subflow_tcp_sock(subflow); in mptcp_shutdown()
2822 mptcp_for_each_subflow(msk, subflow) { in mptcp_shutdown()
2823 struct sock *tcp_sk = mptcp_subflow_tcp_sock(subflow); in mptcp_shutdown()