git: be36ceea1b8f - main - enic: Clean the completion ring matching each queue

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Thu, 17 Sep 2026 05:16:33 UTC
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=be36ceea1b8f75f7f537e77dddb75666671fef8f

commit be36ceea1b8f75f7f537e77dddb75666671fef8f
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-09-17 02:30:01 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-09-17 05:16:00 +0000

    enic: Clean the completion ring matching each queue
    
    The transmit stop loop cleaned the receive completion ring, and the
    receive stop loop cleaned the transmit completion ring.  Use enic_cq_wq()
    for transmit queues and enic_cq_rq() for receive queues, matching the
    queue indices used by the remaining ring bookkeeping.
    
    MFC after:      2 weeks
    Sponsored by:   BBOX.io
---
 sys/dev/enic/if_enic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/enic/if_enic.c b/sys/dev/enic/if_enic.c
index 82bed15e3f67..aa80ee6bafde 100644
--- a/sys/dev/enic/if_enic.c
+++ b/sys/dev/enic/if_enic.c
@@ -945,7 +945,7 @@ enic_stop(if_ctx_t ctx)
 	for (index = 0; index < scctx->isc_ntxqsets; index++) {
 		enic_stop_wq(enic, index);
 		vnic_wq_clean(&enic->wq[index]);
-		vnic_cq_clean(&enic->cq[enic_cq_rq(enic, index)]);
+		vnic_cq_clean(&enic->cq[enic_cq_wq(enic, index)]);
 
 		wq = &softc->enic.wq[index];
 		wq->ring.desc_avail = wq->ring.desc_count - 1;
@@ -961,7 +961,7 @@ enic_stop(if_ctx_t ctx)
 	for (index = 0; index < scctx->isc_nrxqsets; index++) {
 		enic_stop_rq(enic, index);
 		vnic_rq_clean(&enic->rq[index]);
-		vnic_cq_clean(&enic->cq[enic_cq_wq(enic, index)]);
+		vnic_cq_clean(&enic->cq[enic_cq_rq(enic, index)]);
 
 		rq = &softc->enic.rq[index];
 		cq_rq = enic_cq_rq(&softc->enic, index);