Thread (8 messages) 8 messages, 5 authors, 2024-08-09

RE: [PATCH v2 net] net: mana: Fix doorbell out of order violation and avoid unnecessary doorbell rings

From: Long Li <longli@microsoft.com>
Date: 2024-08-08 15:33:41
Also in: linux-hyperv, linux-rdma, lkml, stable

quoted
+	if (w < cq->budget) {
+		mana_gd_ring_cq(gdma_queue, SET_ARM_BIT);
+		cq->work_done_since_doorbell = 0;
+		napi_complete_done(&cq->napi, w);
+	} else if (cq->work_done_since_doorbell >
+		   cq->gdma_cq->queue_size / COMP_ENTRY_SIZE * 4) {
should we define a macro for 4? may be 'CQ_WRAPAROUND_LIMIT'
I prefer to leaving the code as is. This is the only place it's used, and there is a comment explaining why this value is chosen.
quoted
+		/* MANA hardware requires at least one doorbell ring every 8
+		 * wraparounds of CQ even if there is no need to arm the CQ.
+		 * This driver rings the doorbell as soon as we have exceeded
+		 * 4 wraparounds.
+		 */
+		mana_gd_ring_cq(gdma_queue, 0);
+		cq->work_done_since_doorbell = 0;
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help