Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af74d195 authored by Devesh Sharma's avatar Devesh Sharma Committed by Doug Ledford
Browse files

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: default avatarDevesh Sharma <devesh.sharma@avagotech.com>
Signed-off-by: default avatarSelvin Xavier <selvin.xavier@avagotech.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent aeb922df
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -2933,16 +2933,11 @@ static int ocrdma_poll_hwcq(struct ocrdma_cq *cq, int num_entries,
	}
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;