mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-19 21:56:31 +00:00
ib_srpt: Cache global L_Key
This patch does not change any functionality. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7017 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
+4
-3
@@ -958,7 +958,7 @@ static int srpt_post_recv(struct srpt_device *sdev, struct srpt_rdma_ch *ch,
|
||||
|
||||
list.addr = ioctx->ioctx.dma + ioctx->ioctx.offset;
|
||||
list.length = srp_max_req_size;
|
||||
list.lkey = sdev->mr->lkey;
|
||||
list.lkey = sdev->lkey;
|
||||
|
||||
wr.next = NULL;
|
||||
wr.sg_list = &list;
|
||||
@@ -1001,7 +1001,7 @@ static int srpt_post_send(struct srpt_rdma_ch *ch,
|
||||
|
||||
list.addr = ioctx->ioctx.dma;
|
||||
list.length = len;
|
||||
list.lkey = sdev->mr->lkey;
|
||||
list.lkey = sdev->lkey;
|
||||
|
||||
wr.next = NULL;
|
||||
wr.wr_id = encode_wr_id(SRPT_SEND, ioctx->ioctx.index);
|
||||
@@ -3299,7 +3299,7 @@ static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch,
|
||||
|
||||
while (rsize > 0 && tsize > 0) {
|
||||
sge->addr = dma_addr;
|
||||
sge->lkey = ch->sport->sdev->mr->lkey;
|
||||
sge->lkey = ch->sport->sdev->lkey;
|
||||
|
||||
if (rsize >= dma_len) {
|
||||
sge->length =
|
||||
@@ -4357,6 +4357,7 @@ static void srpt_add_one(struct ib_device *device)
|
||||
pr_err("ib_get_dma_mr() failed: %ld\n", PTR_ERR(sdev->mr));
|
||||
goto err_pd;
|
||||
}
|
||||
sdev->lkey = sdev->mr->lkey;
|
||||
|
||||
sdev->srq_size = min(max(srpt_srq_size, MIN_SRPT_SRQ_SIZE),
|
||||
sdev->dev_attr.max_srq_wr);
|
||||
|
||||
+3
-1
@@ -442,7 +442,8 @@ struct srpt_port {
|
||||
* struct srpt_device - Information associated by SRPT with a single HCA.
|
||||
* @device: Backpointer to the struct ib_device managed by the IB core.
|
||||
* @pd: IB protection domain.
|
||||
* @mr: L_Key (local key) with write access to all local memory.
|
||||
* @mr: MR with write access to all local memory.
|
||||
* @lkey: L_Key (local key) with write access to all local memory.
|
||||
* @srq: Per-HCA SRQ (shared receive queue).
|
||||
* @cm_id: Connection identifier.
|
||||
* @dev_attr: Attributes of the InfiniBand device as obtained during the
|
||||
@@ -460,6 +461,7 @@ struct srpt_device {
|
||||
struct ib_srq *srq;
|
||||
struct ib_cm_id *cm_id;
|
||||
struct ib_device_attr dev_attr;
|
||||
u32 lkey;
|
||||
int srq_size;
|
||||
bool use_srq;
|
||||
struct srpt_recv_ioctx **ioctx_ring;
|
||||
|
||||
Reference in New Issue
Block a user