mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 03:01:26 +00:00
isert: Only set signalled flag when needed
Do not set signalled flag and then zero it for unneeded cases.
Instead only set it when necessary
Signed-off-by: Yan Burman <yanb@mellanox.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6481 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -220,12 +220,15 @@ int isert_wr_init(struct isert_wr *wr,
|
||||
enum ib_wr_opcode send_wr_op = IB_WR_SEND;
|
||||
struct scatterlist *sg_tmp;
|
||||
int i;
|
||||
u32 send_flags = 0;
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
switch (wr_op) {
|
||||
case ISER_WR_RECV:
|
||||
break;
|
||||
case ISER_WR_SEND:
|
||||
send_flags = IB_SEND_SIGNALED;
|
||||
break;
|
||||
case ISER_WR_RDMA_READ:
|
||||
send_wr_op = IB_WR_RDMA_READ;
|
||||
@@ -280,7 +283,7 @@ int isert_wr_init(struct isert_wr *wr,
|
||||
wr->send_wr.sg_list = wr->sge_list;
|
||||
wr->send_wr.num_sge = sg_cnt;
|
||||
wr->send_wr.opcode = send_wr_op;
|
||||
wr->send_wr.send_flags = IB_SEND_SIGNALED;
|
||||
wr->send_wr.send_flags = send_flags;
|
||||
}
|
||||
|
||||
out:
|
||||
|
||||
@@ -214,10 +214,8 @@ static inline void isert_link_send_wrs(struct isert_wr *from_wr,
|
||||
struct isert_wr *to_wr)
|
||||
{
|
||||
from_wr->send_wr.next = &to_wr->send_wr;
|
||||
from_wr->send_wr.send_flags = 0; /* not signaled */
|
||||
|
||||
to_wr->send_wr.next = NULL;
|
||||
to_wr->send_wr.send_flags = IB_SEND_SIGNALED;
|
||||
}
|
||||
|
||||
static inline void isert_link_send_pdu_wrs(struct isert_cmnd *from_pdu,
|
||||
@@ -282,6 +280,9 @@ int isert_prepare_rdma(struct isert_cmnd *isert_pdu,
|
||||
for (i = 1; i < wr_cnt; ++i)
|
||||
isert_link_send_wrs(&isert_pdu->wr[i - 1], &isert_pdu->wr[i]);
|
||||
|
||||
if (op == ISER_WR_RDMA_READ)
|
||||
isert_pdu->wr[wr_cnt - 1].send_wr.send_flags = IB_SEND_SIGNALED;
|
||||
|
||||
out:
|
||||
TRACE_EXIT_RES(wr_cnt);
|
||||
return wr_cnt;
|
||||
|
||||
Reference in New Issue
Block a user