Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56b5390c authored by Bart Van Assche's avatar Bart Van Assche Committed by Doug Ledford
Browse files

IB/srp: Use P_Key cache for P_Key lookups



This change slightly reduces the time needed to log in.

Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Reviewed-by: default avatarSagi Grimberg <sagig@mellanox.com>
Reviewed-by: default avatarDavid Dillow <dave@thedillows.org>
Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent c841e12a
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -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,7 +266,7 @@ static int srp_init_qp(struct srp_target_port *target,
	if (!attr)
		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,
				  be16_to_cpu(target->pkey),
				  &attr->pkey_index);