From: Bart Van Assche Date: Wed, 9 Jul 2014 13:58:22 +0000 (+0200) Subject: IB/srp: Use P_Key cache for P_Key lookups X-Git-Tag: v4.1-rc1~35^2^6~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=56b5390caf73694b2f50a042542f0b43c29d5ca8;p=platform%2Fkernel%2Flinux-exynos.git 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 Reviewed-by: Sagi Grimberg Reviewed-by: David Dillow Cc: Sebastian Parschauer Signed-off-by: Doug Ledford --- diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 0747c05..918814c 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -40,6 +40,7 @@ #include #include #include +#include #include @@ -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;