2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 14:43:58 +08:00

IB/srp: Use P_Key cache for P_Key lookups

This change slightly reduces the time needed to log in.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: David Dillow <dave@thedillows.org>
Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
Bart Van Assche 2014-07-09 15:58:22 +02:00 committed by Doug Ledford
parent c841e12add
commit 56b5390caf

View File

@ -40,6 +40,7 @@
#include <linux/parser.h> #include <linux/parser.h>
#include <linux/random.h> #include <linux/random.h>
#include <linux/jiffies.h> #include <linux/jiffies.h>
#include <rdma/ib_cache.h>
#include <linux/atomic.h> #include <linux/atomic.h>
@ -265,7 +266,7 @@ static int srp_init_qp(struct srp_target_port *target,
if (!attr) if (!attr)
return -ENOMEM; return -ENOMEM;
ret = ib_find_pkey(target->srp_host->srp_dev->dev, ret = ib_find_cached_pkey(target->srp_host->srp_dev->dev,
target->srp_host->port, target->srp_host->port,
be16_to_cpu(target->pkey), be16_to_cpu(target->pkey),
&attr->pkey_index); &attr->pkey_index);