mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-19 21:56:31 +00:00
ib_srpt: Defer reenabling interrupts until after completion processing finished
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4675 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
+11
-2
@@ -2007,13 +2007,12 @@ static void srpt_process_send_completion(struct ib_cq *cq,
|
||||
srpt_process_wait_list(ch);
|
||||
}
|
||||
|
||||
static void srpt_process_completion(struct srpt_rdma_ch *ch)
|
||||
static void srpt_poll(struct srpt_rdma_ch *ch)
|
||||
{
|
||||
struct ib_cq *const cq = ch->cq;
|
||||
struct ib_wc *const wc = ch->wc;
|
||||
int i, n;
|
||||
|
||||
ib_req_notify_cq(cq, IB_CQ_NEXT_COMP);
|
||||
while ((n = ib_poll_cq(cq, ARRAY_SIZE(ch->wc), wc)) > 0) {
|
||||
for (i = 0; i < n; i++) {
|
||||
if (opcode_from_wr_id(wc[i].wr_id) == SRPT_RECV)
|
||||
@@ -2024,6 +2023,16 @@ static void srpt_process_completion(struct srpt_rdma_ch *ch)
|
||||
}
|
||||
}
|
||||
|
||||
static void srpt_process_completion(struct srpt_rdma_ch *ch)
|
||||
{
|
||||
struct ib_cq *const cq = ch->cq;
|
||||
|
||||
do {
|
||||
srpt_poll(ch);
|
||||
} while (ib_req_notify_cq(cq, IB_CQ_NEXT_COMP |
|
||||
IB_CQ_REPORT_MISSED_EVENTS) > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* srpt_completion() - IB completion queue callback function.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user