patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Nicolas Chautru <nicolas.chautru@intel.com>, dev@dpdk.org
Cc: hemant.agrawal@nxp.com, hernan.vargas@intel.com, stable@dpdk.org
Subject: Re: [PATCH v1 1/1] baseband/acc: fix ring memory allocation logic
Date: Tue, 5 Nov 2024 14:55:59 +0100	[thread overview]
Message-ID: <cb4cdf1c-e4f4-41ed-8aad-43028cb4438f@redhat.com> (raw)
In-Reply-To: <20241030185614.1605876-2-nicolas.chautru@intel.com>

Hi Nicolas,

On 10/30/24 19:56, Nicolas Chautru wrote:
> 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;

IMHO, the proper fix would be to fix sw_ring_iova_end_addr to really
represent the last address of the block and not the start address ofthe
next one:

sw_ring_iova_end_addr = sw_rings_base_iova + dev_sw_ring_size - 1;

Regards,
Maxime


      reply	other threads:[~2024-11-05 13:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20241030185614.1605876-1-nicolas.chautru@intel.com>
2024-10-30 18:56 ` Nicolas Chautru
2024-11-05 13:55   ` Maxime Coquelin [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=cb4cdf1c-e4f4-41ed-8aad-43028cb4438f@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=hernan.vargas@intel.com \
    --cc=nicolas.chautru@intel.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).