diff options
author | Bart Van Assche <[email protected]> | 2014-07-09 15:58:22 +0200 |
---|---|---|
committer | Doug Ledford <[email protected]> | 2015-04-15 16:06:54 -0400 |
commit | 56b5390caf73694b2f50a042542f0b43c29d5ca8 (patch) | |
tree | 34d308671d34d14a5f6c21babe3d6495bbe60954 | |
parent | c841e12add6926d64aa608687893465330b5a03e (diff) |
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 <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: David Dillow <[email protected]>
Cc: Sebastian Parschauer <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 0747c0595a9d..918814cd0f80 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -40,6 +40,7 @@ #include <linux/parser.h> #include <linux/random.h> #include <linux/jiffies.h> +#include <rdma/ib_cache.h> #include <linux/atomic.h> @@ -265,10 +266,10 @@ static int srp_init_qp(struct srp_target_port *target, if (!attr) return -ENOMEM; - ret = ib_find_pkey(target->srp_host->srp_dev->dev, - target->srp_host->port, - be16_to_cpu(target->pkey), - &attr->pkey_index); + ret = ib_find_cached_pkey(target->srp_host->srp_dev->dev, + target->srp_host->port, + be16_to_cpu(target->pkey), + &attr->pkey_index); if (ret) goto out; |