Message ID | 1446446245-534-4-git-send-email-devesh.sharma@avagotech.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
diff --git a/src/ocrdma_verbs.c b/src/ocrdma_verbs.c index d80ab27..cf6f72c 100644 --- a/src/ocrdma_verbs.c +++ b/src/ocrdma_verbs.c @@ -2003,14 +2003,11 @@ expand_cqe: } stop_cqe: cq->getp = cur_getp; - if (cq->deferred_arm) { - ocrdma_ring_cq_db(cq, 1, cq->deferred_sol, polled_hw_cqes); + if (cq->deferred_arm || polled_hw_cqes) { + ocrdma_ring_cq_db(cq, cq->deferred_arm, + cq->deferred_sol, polled_hw_cqes); cq->deferred_arm = 0; cq->deferred_sol = 0; - } else { - /* We need to pop the CQE. No need to arm */ - ocrdma_ring_cq_db(cq, 0, cq->deferred_sol, polled_hw_cqes); - cq->deferred_sol = 0; } return i;
Changing CQ-Doorbell(DB) logic to prevent DB floods, it is supposed to be pressed only if any hw CQE is polled. If cq-arm was requested previously then don't bother about number of hw CQEs polled and arm the CQ. Signed-off-by: Devesh Sharma <devesh.sharma@avagotech.com> --- src/ocrdma_verbs.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)