[PATCH v1 1/1] baseband/acc: fix ring memory allocation logic

Nicolas Chautru nicolas.chautru at intel.com
Wed Oct 30 19:56:14 CET 2024


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 at dpdk.org

Signed-off-by: Nicolas Chautru <nicolas.chautru at 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



More information about the stable mailing list