DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kevin Laatz <kevin.laatz@intel.com>
To: Chengwen Feng <fengchengwen@huawei.com>, <dev@dpdk.org>
Cc: <thomas@monjalon.net>, <bruce.richardson@intel.com>
Subject: Re: [PATCH 2/4] app/test: support test last-idx when no DMA completed
Date: Mon, 30 May 2022 12:40:25 +0100	[thread overview]
Message-ID: <42e4b394-3c5c-f1e8-2f8c-7af78ef350f7@intel.com> (raw)
In-Reply-To: <20220527034055.33271-3-fengchengwen@huawei.com>

Tested with IOAT and IDXD, both pass unit tests.

Tested-by: Kevin Laatz <kevin.laatz@intel.com>

On 27/05/2022 04:40, Chengwen Feng wrote:
> If no DMA request is completed, the ring_idx of the last completed
> operation need returned by last_idx parameter. This patch adds
> testcase for it.
>
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> ---
>   app/test/test_dmadev.c | 15 +++++++++++++++
>   1 file changed, 15 insertions(+)
>
> diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c
> index 2b097e0f47..a7651a486f 100644
> --- a/app/test/test_dmadev.c
> +++ b/app/test/test_dmadev.c
> @@ -177,6 +177,7 @@ do_multi_copies(int16_t dev_id, uint16_t vchan,
>   static int
>   test_enqueue_copies(int16_t dev_id, uint16_t vchan)
>   {
> +	enum rte_dma_status_code status;
>   	unsigned int i;
>   	uint16_t id;
>   
> @@ -215,6 +216,20 @@ test_enqueue_copies(int16_t dev_id, uint16_t vchan)
>   			ERR_RETURN("Error:incorrect job id received, %u [expected %u]\n",
>   					id, id_count);
>   
> +		/* check for completed and id when no job done */
> +		if (rte_dma_completed(dev_id, vchan, 1, &id, NULL) != 0)
> +			ERR_RETURN("Error with rte_dma_completed when no job done\n");
> +		if (id != id_count)
> +			ERR_RETURN("Error:incorrect job id received when no job done, %u [expected %u]\n",
> +					id, id_count);
> +
> +		/* check for completed_status and id when no job done */
> +		if (rte_dma_completed_status(dev_id, vchan, 1, &id, &status) != 0)
> +			ERR_RETURN("Error with rte_dma_completed_status when no job done\n");
> +		if (id != id_count)
> +			ERR_RETURN("Error:incorrect job id received when no job done, %u [expected %u]\n",
> +					id, id_count);
> +
>   		rte_pktmbuf_free(src);
>   		rte_pktmbuf_free(dst);
>   

  reply	other threads:[~2022-05-30 11:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27  3:40 [PATCH 0/4] bugfix and feature for Hisilicon DMA PMD Chengwen Feng
2022-05-27  3:40 ` [PATCH 1/4] dma/hisilicon: fix return last-idx when no DMA completed Chengwen Feng
2022-05-27  3:40 ` [PATCH 2/4] app/test: support test " Chengwen Feng
2022-05-30 11:40   ` Kevin Laatz [this message]
2022-05-27  3:40 ` [PATCH 3/4] dma/hisilicon: enhance robustness of scan CQ Chengwen Feng
2022-05-27  3:40 ` [PATCH 4/4] dma/hisilicon: support vchan-status ops Chengwen Feng
2022-06-07 10:44 ` [PATCH 0/4] bugfix and feature for Hisilicon DMA PMD Thomas Monjalon

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=42e4b394-3c5c-f1e8-2f8c-7af78ef350f7@intel.com \
    --to=kevin.laatz@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.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).