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()
156 struct token_bucket *bucket; in mptcp_token_new_connect() local
162 bucket = token_bucket(subflow->token); in mptcp_token_new_connect()
163 spin_lock_bh(&bucket->lock); in mptcp_token_new_connect()
164 if (__token_bucket_busy(bucket, subflow->token)) { in mptcp_token_new_connect()
165 spin_unlock_bh(&bucket->lock); in mptcp_token_new_connect()
175 __sk_nulls_add_node_rcu((struct sock *)msk, &bucket->msk_chain); in mptcp_token_new_connect()
176 bucket->chain_len++; in mptcp_token_new_connect()
177 spin_unlock_bh(&bucket->lock); in mptcp_token_new_connect()
193 struct token_bucket *bucket; in mptcp_token_accept() local
195 bucket = token_bucket(req->token); in mptcp_token_accept()
196 spin_lock_bh(&bucket->lock); in mptcp_token_accept()
199 pos = __token_lookup_req(bucket, req->token); in mptcp_token_accept()
202 __sk_nulls_add_node_rcu((struct sock *)msk, &bucket->msk_chain); in mptcp_token_accept()
203 spin_unlock_bh(&bucket->lock); in mptcp_token_accept()
209 struct token_bucket *bucket; in mptcp_token_exists() local
214 bucket = token_bucket(token); in mptcp_token_exists()
217 sk_nulls_for_each_rcu(sk, pos, &bucket->msk_chain) { in mptcp_token_exists()
245 struct token_bucket *bucket; in mptcp_token_get_sock() local
250 bucket = token_bucket(token); in mptcp_token_get_sock()
253 sk_nulls_for_each_rcu(sk, pos, &bucket->msk_chain) { in mptcp_token_get_sock()
301 struct token_bucket *bucket = &token_hash[slot]; in mptcp_token_iter_next() local
306 if (hlist_nulls_empty(&bucket->msk_chain)) in mptcp_token_iter_next()
310 sk_nulls_for_each_rcu(sk, pos, &bucket->msk_chain) { in mptcp_token_iter_next()
350 struct token_bucket *bucket; in mptcp_token_destroy_request() local
355 bucket = token_bucket(subflow_req->token); in mptcp_token_destroy_request()
356 spin_lock_bh(&bucket->lock); in mptcp_token_destroy_request()
357 pos = __token_lookup_req(bucket, subflow_req->token); in mptcp_token_destroy_request()
360 bucket->chain_len--; in mptcp_token_destroy_request()
362 spin_unlock_bh(&bucket->lock); in mptcp_token_destroy_request()
373 struct token_bucket *bucket; in mptcp_token_destroy() local
379 bucket = token_bucket(msk->token); in mptcp_token_destroy()
380 spin_lock_bh(&bucket->lock); in mptcp_token_destroy()
381 pos = __token_lookup_msk(bucket, msk->token); in mptcp_token_destroy()
384 bucket->chain_len--; in mptcp_token_destroy()
386 spin_unlock_bh(&bucket->lock); in mptcp_token_destroy()