Lines Matching defs:first

94 	WRITE_ONCE(msk->first, ssock->sk);
101 /* This is the first subflow, always with id 0 */
103 mptcp_sock_graft(msk->first, sk->sk_socket);
109 /* If the MPC handshake is not started, returns the first subflow,
120 if (!msk->first) {
125 mptcp_sockopt_sync(msk, msk->first);
128 return msk->first;
595 * is the first opportunity to act on the DATA_FIN and change
609 smp_mb__before_atomic(); /* SHUTDOWN must be visible first */
1081 bool first = true;
1086 if (first)
1090 first = false;
1640 static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk, bool first)
1656 * spooling the first chunk of data
1658 if (first) {
1661 first = false;
1727 * first subflow right now. Otherwise we are in the defer_connect
1728 * path, and the first subflow must be already present.
1729 * Since the defer_connect flag is cleared after the first succsful
1737 if (!msk->first)
1740 ssk = msk->first;
1972 mptcp_rcv_space_init(msk, msk->first);
2396 /* If the first subflow moved to a close state before accept, e.g. due
2401 if (msk->in_accept_queue && msk->first == ssk &&
2411 dispose_it = msk->free_first || ssk != msk->first;
2457 if (ssk == msk->first)
2458 WRITE_ONCE(msk->first, NULL);
2470 if (list_is_singular(&msk->conn_list) && msk->first &&
2471 inet_sk_state_load(msk->first) == TCP_CLOSE) {
2571 smp_mb__before_atomic(); /* SHUTDOWN must be visible first */
2594 /* first check ssk: need to kick "stale" logic */
2685 struct sock *ssk = msk->first;
2746 fail_tout = msk->first ? READ_ONCE(mptcp_subflow_ctx(msk->first)->fail_tout) : 0;
2770 WRITE_ONCE(msk->first, NULL);
3016 ssk = mptcp_sk(sk)->first;
3066 if (ssk == msk->first)
3156 /* msk->subflow is still intact, the following will not free the first
3276 /* passive msk is created after the first/MPC subflow */
3288 WRITE_ONCE(msk->first, ssk);
3475 * On sk release avoid actions depending on the first subflow
3477 if (__test_and_clear_bit(MPTCP_SYNC_STATE, &msk->cb_flags) && msk->first)
3557 pr_debug("msk=%p, ssk=%p", msk, msk->first);
3558 if (WARN_ON_ONCE(!msk->first))
3561 return inet_csk_get_port(msk->first, snum);
3673 if (__mptcp_check_fallback(msk) && msk->first) {
3674 struct tcp_sock *tp = tcp_sk(msk->first);
3676 /* the first subflow is disconnected after close - see
3680 if (!((1 << msk->first->sk_state) &
3909 * but no need to allocate the first subflow just to error out.
3911 ssk = READ_ONCE(msk->first);
3939 /* Do late cleanup for the first subflow as necessary. Also
3942 if (unlikely(inet_sk_state_load(msk->first) == TCP_CLOSE)) {
3943 __mptcp_close_ssk(newsk, msk->first,
3944 mptcp_subflow_ctx(msk->first), 0);
3984 struct sock *ssk = READ_ONCE(msk->first);