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@xxxxxxxxxxxxx> --- src/ocrdma_verbs.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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; -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html