diff options
author | Devesh Sharma <devesh.sharma@avagotech.com> | 2015-10-20 10:47:59 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-10-21 23:28:19 +0200 |
commit | af74d1956f780253d643a15f30d6aaa1c2e4836d (patch) | |
tree | d579cb2622fd89b71b3b798a78ef558973809475 /drivers/infiniband/hw/ocrdma | |
parent | RDMA/ocrdma: Check resource ids received in Async CQE (diff) | |
download | linux-af74d1956f780253d643a15f30d6aaa1c2e4836d.tar.xz linux-af74d1956f780253d643a15f30d6aaa1c2e4836d.zip |
RDMA/ocrdma: Prevent CQ-Doorbell floods
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>
Signed-off-by: Selvin Xavier <selvin.xavier@avagotech.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/ocrdma')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index 1f3affb6a477..1c4e83d5d153 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -2933,16 +2933,11 @@ expand_cqe: } stop_cqe: cq->getp = cur_getp; - if (cq->deferred_arm) { - ocrdma_ring_cq_db(dev, cq->id, true, cq->deferred_sol, - polled_hw_cqes); + if (cq->deferred_arm || polled_hw_cqes) { + ocrdma_ring_cq_db(dev, cq->id, cq->deferred_arm, + cq->deferred_sol, polled_hw_cqes); cq->deferred_arm = false; cq->deferred_sol = false; - } else { - /* We need to pop the CQE. No need to arm */ - ocrdma_ring_cq_db(dev, cq->id, false, cq->deferred_sol, - polled_hw_cqes); - cq->deferred_sol = false; } return i; |