isert-scst: Cache L_Key

This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7019 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2016-10-25 22:21:46 +00:00
parent 8c04ce53f4
commit bfe9d77412
3 changed files with 3 additions and 1 deletions

View File

@@ -234,6 +234,7 @@ struct isert_device {
struct ib_device *ib_dev;
struct ib_pd *pd;
struct ib_mr *mr;
u32 lkey;
struct list_head devs_node;
/* conn_list and refcnt protected by dev_list_mutex */

View File

@@ -201,7 +201,7 @@ static int isert_alloc_for_rdma(struct isert_cmnd *pdu, int sge_cnt,
isert_wr_set_fields(&pdu->wr[i], isert_conn, pdu);
for (i = 0; i < sge_cnt; ++i)
pdu->sg_pool[i].lkey = isert_conn->isert_dev->mr->lkey;
pdu->sg_pool[i].lkey = isert_conn->isert_dev->lkey;
goto out;

View File

@@ -1092,6 +1092,7 @@ static struct isert_device *isert_device_create(struct ib_device *ib_dev)
isert_dev->ib_dev = ib_dev;
isert_dev->pd = pd;
isert_dev->mr = mr;
isert_dev->lkey = mr->lkey;
INIT_LIST_HEAD(&isert_dev->conn_list);