DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hernan Vargas <hernan.vargas@intel.com>
To: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com,
	maxime.coquelin@redhat.com
Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com,
	Hernan Vargas <hernan.vargas@intel.com>,
	stable@dpdk.org
Subject: [PATCH v1 2/5] baseband/acc: fix queue depth computation error
Date: Tue,  3 Nov 2026 09:28:59 -0800	[thread overview]
Message-ID: <20261103172902.4152956-3-hernan.vargas@intel.com> (raw)
In-Reply-To: <20261103172902.4152956-1-hernan.vargas@intel.com>

Fix to the computation of available dequeue size.
Protects notably for possible negative scenarios when dequeuing
descriptors.

Fixes: e640f6cdfa84 ("baseband/acc200: add LDPC processing")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
---
 drivers/baseband/acc/acc_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/baseband/acc/acc_common.h b/drivers/baseband/acc/acc_common.h
index 3d411cd25f..255e0971b8 100644
--- a/drivers/baseband/acc/acc_common.h
+++ b/drivers/baseband/acc/acc_common.h
@@ -1602,7 +1602,7 @@ acc_ring_avail_enq(struct acc_queue *q)
 static inline uint32_t
 acc_ring_avail_deq(struct acc_queue *q)
 {
-	return (q->sw_ring_depth + q->sw_ring_head - q->sw_ring_tail) & q->sw_ring_wrap_mask;
+	return (q->sw_ring_head - q->sw_ring_tail) & q->sw_ring_wrap_mask;
 }
 
 /* Check room in AQ for the enqueues batches into Qmgr */
-- 
2.34.1


  parent reply	other threads:[~2026-11-03 17:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 17:28 [PATCH v1 0/5] bbdev, baseband/acc: bug fixes Hernan Vargas
2026-11-03 17:28 ` [PATCH v1 1/5] bbdev: fix status error for ops dump Hernan Vargas
2026-11-03 17:28 ` Hernan Vargas [this message]
2026-11-03 17:29 ` [PATCH v1 3/5] baseband/acc: fix PF2VF Bug for FFT window probing Hernan Vargas
2026-11-03 17:29 ` [PATCH v1 4/5] baseband/acc: fix ring interrupt handler err path Hernan Vargas
2026-11-03 17:29 ` [PATCH v1 5/5] baseband/acc: fix bug when alternating TB mode Hernan Vargas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261103172902.4152956-3-hernan.vargas@intel.com \
    --to=hernan.vargas@intel.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=nicolas.chautru@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    --cc=trix@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox