DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nicolas Chautru <nicolas.chautru@intel.com>
To: dev@dpdk.org, maxime.coquelin@redhat.com
Cc: hemant.agrawal@nxp.com, hernan.vargas@intel.com,
	Nicolas Chautru <nicolas.chautru@intel.com>,
	stable@dpdk.org
Subject: [PATCH v1 1/1] baseband/acc: fix ring memory allocation logic
Date: Wed, 30 Oct 2024 11:56:14 -0700	[thread overview]
Message-ID: <20241030185614.1605876-2-nicolas.chautru@intel.com> (raw)
In-Reply-To: <20241030185614.1605876-1-nicolas.chautru@intel.com>

Allowing ring memory allocation whose end address is aligned with 64 MB.
Previous logic was off by one.

Fixes: 060e76729302 ("baseband/acc100: add queue configuration")
Cc: stable@dpdk.org

Signed-off-by: Nicolas Chautru <nicolas.chautru@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 4c60b7896b..55b43bab4e 100644
--- a/drivers/baseband/acc/acc_common.h
+++ b/drivers/baseband/acc/acc_common.h
@@ -800,7 +800,7 @@ alloc_sw_rings_min_mem(struct rte_bbdev *dev, struct acc_device *d,
 		/* Check if the end of the sw ring memory block is before the
 		 * start of next 64MB aligned mem address
 		 */
-		if (sw_ring_iova_end_addr < next_64mb_align_addr_iova) {
+		if (sw_ring_iova_end_addr <= next_64mb_align_addr_iova) {
 			d->sw_rings_iova = sw_rings_base_iova;
 			d->sw_rings = sw_rings_base;
 			d->sw_rings_base = sw_rings_base;
-- 
2.34.1


      reply	other threads:[~2024-10-30 18:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30 18:56 [PATCH v1 0/1] " Nicolas Chautru
2024-10-30 18:56 ` Nicolas Chautru [this message]

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=20241030185614.1605876-2-nicolas.chautru@intel.com \
    --to=nicolas.chautru@intel.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=hernan.vargas@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    /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;
as well as URLs for NNTP newsgroup(s).