Lines Matching refs:bucket
111 struct token_bucket *bucket; in mptcp_token_new_request() local
122 bucket = token_bucket(token); in mptcp_token_new_request()
123 spin_lock_bh(&bucket->lock); in mptcp_token_new_request()
124 if (__token_bucket_busy(bucket, token)) { in mptcp_token_new_request()
125 spin_unlock_bh(&bucket->lock); in mptcp_token_new_request()
129 hlist_nulls_add_head_rcu(&subflow_req->token_node, &bucket->req_chain); in mptcp_token_new_request()
130 bucket->chain_len++; in mptcp_token_new_request()
131 spin_unlock_bh(&bucket->lock); in mptcp_token_new_request()
157 struct token_bucket *bucket; in mptcp_token_new_connect() local
163 bucket = token_bucket(subflow->token); in mptcp_token_new_connect()
164 spin_lock_bh(&bucket->lock); in mptcp_token_new_connect()
165 if (__token_bucket_busy(bucket, subflow->token)) { in mptcp_token_new_connect()
166 spin_unlock_bh(&bucket->lock); in mptcp_token_new_connect()
176 __sk_nulls_add_node_rcu((struct sock *)msk, &bucket->msk_chain); in mptcp_token_new_connect()
177 bucket->chain_len++; in mptcp_token_new_connect()
178 spin_unlock_bh(&bucket->lock); in mptcp_token_new_connect()
196 struct token_bucket *bucket; in mptcp_token_accept() local
199 bucket = token_bucket(req->token); in mptcp_token_accept()
200 spin_lock_bh(&bucket->lock); in mptcp_token_accept()
203 pos = __token_lookup_req(bucket, req->token); in mptcp_token_accept()
206 __sk_nulls_add_node_rcu((struct sock *)msk, &bucket->msk_chain); in mptcp_token_accept()
207 spin_unlock_bh(&bucket->lock); in mptcp_token_accept()
213 struct token_bucket *bucket; in mptcp_token_exists() local
218 bucket = token_bucket(token); in mptcp_token_exists()
221 sk_nulls_for_each_rcu(sk, pos, &bucket->msk_chain) { in mptcp_token_exists()
249 struct token_bucket *bucket; in mptcp_token_get_sock() local
254 bucket = token_bucket(token); in mptcp_token_get_sock()
257 sk_nulls_for_each_rcu(sk, pos, &bucket->msk_chain) { in mptcp_token_get_sock()
305 struct token_bucket *bucket = &token_hash[slot]; in mptcp_token_iter_next() local
310 if (hlist_nulls_empty(&bucket->msk_chain)) in mptcp_token_iter_next()
314 sk_nulls_for_each_rcu(sk, pos, &bucket->msk_chain) { in mptcp_token_iter_next()
354 struct token_bucket *bucket; in mptcp_token_destroy_request() local
359 bucket = token_bucket(subflow_req->token); in mptcp_token_destroy_request()
360 spin_lock_bh(&bucket->lock); in mptcp_token_destroy_request()
361 pos = __token_lookup_req(bucket, subflow_req->token); in mptcp_token_destroy_request()
364 bucket->chain_len--; in mptcp_token_destroy_request()
366 spin_unlock_bh(&bucket->lock); in mptcp_token_destroy_request()
378 struct token_bucket *bucket; in mptcp_token_destroy() local
385 bucket = token_bucket(msk->token); in mptcp_token_destroy()
386 spin_lock_bh(&bucket->lock); in mptcp_token_destroy()
387 pos = __token_lookup_msk(bucket, msk->token); in mptcp_token_destroy()
390 bucket->chain_len--; in mptcp_token_destroy()
392 spin_unlock_bh(&bucket->lock); in mptcp_token_destroy()