mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04: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 <[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]>
This commit is contained in:
parent
c841e12add
commit
56b5390caf
1 changed files with 5 additions and 4 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue