DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Chengwen Feng <fengchengwen@huawei.com>
Cc: <thomas@monjalon.net>, <dev@dpdk.org>, <kevin.laatz@intel.com>
Subject: Re: [PATCH 2/2] test/dma: support auto adapt ringsize
Date: Wed, 27 Aug 2025 08:36:45 +0100	[thread overview]
Message-ID: <aK61jTGN5yihl5I2@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20250827012829.40752-3-fengchengwen@huawei.com>

On Wed, Aug 27, 2025 at 09:28:29AM +0800, Chengwen Feng wrote:
> The default ringsize is 512, some DMA devices may not support, this
> commit support auto adapt ringsize.
> 
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> ---

Seems reasonable.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>


>  app/test/test_dmadev.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c
> index 482d564f7a..e1a919cd81 100644
> --- a/app/test/test_dmadev.c
> +++ b/app/test/test_dmadev.c
> @@ -1135,7 +1135,7 @@ test_dmadev_setup(void)
>  	int16_t dev_id = test_dev_id;
>  	struct rte_dma_stats stats;
>  	const struct rte_dma_conf conf = { .nb_vchans = 1};
> -	const struct rte_dma_vchan_conf qconf = {
> +	struct rte_dma_vchan_conf qconf = {
>  			.direction = RTE_DMA_DIR_MEM_TO_MEM,
>  			.nb_desc = TEST_RINGSIZE,
>  	};
> @@ -1151,6 +1151,10 @@ test_dmadev_setup(void)
>  	if (rte_dma_configure(dev_id, &conf) != 0)
>  		ERR_RETURN("Error with rte_dma_configure()\n");
>  
> +	if (qconf.nb_desc < info.min_desc)
> +		qconf.nb_desc = info.min_desc;
> +	if (qconf.nb_desc > info.max_desc)
> +		qconf.nb_desc = info.max_desc;
>  	if (rte_dma_vchan_setup(dev_id, vchan, &qconf) < 0)
>  		ERR_RETURN("Error with queue configuration\n");
>  
> -- 
> 2.17.1
> 

      reply	other threads:[~2025-08-27  7:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-27  1:28 [PATCH 0/2] bugfix and enhance for DMA test Chengwen Feng
2025-08-27  1:28 ` [PATCH 1/2] test/dma: fix some testcase never fail Chengwen Feng
2025-08-27  1:28 ` [PATCH 2/2] test/dma: support auto adapt ringsize Chengwen Feng
2025-08-27  7:36   ` Bruce Richardson [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=aK61jTGN5yihl5I2@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=kevin.laatz@intel.com \
    --cc=thomas@monjalon.net \
    /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).