[PATCH v2] af_rxrpc: Keep rxrpc_call pointers in a hashtable

David Howells dhowells at redhat.com
Fri Feb 21 06:52:34 EST 2014


Tim Smith <tim at electronghost.co.uk> wrote:

> +	hash_for_each_possible_rcu(rxrpc_call_hash, call, hash_node, key) {
> +		if (call->hash_key == key &&
> +		    call->call_id == call_id &&
> +		    call->cid == cid &&
> +		    call->in_clientflag == clientflag &&
> +		    call->service_id == service_id &&
> +		    call->proto == proto &&
> +		    call->local == localptr &&
> +		    memcmp(call->peer_ip.ipv6_addr, peer_addr,
> +			      addr_size) == 0 &&
> +		    call->epoch == epoch)
> +			ret = call;

break?

> +static struct rxrpc_connection *rxrpc_conn_from_local(struct rxrpc_local *local,
> +					       struct sk_buff *skb,
> +					       struct rxrpc_skb_priv *sp)
> +{

It would be good if this function could use RCU also, but that can be a
separate patch.

It's looking a lot better now:-)

David



More information about the linux-afs mailing list