DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
To: Amit Prakash Shukla <amitprakashs@marvell.com>,
	Jerin Jacob <jerinj@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Vamsi Krishna Attunuru <vattunuru@marvell.com>,
	Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
	Anoob Joseph <anoobj@marvell.com>,
	Aakash Sasidharan <asasidharan@marvell.com>,
	Amit Prakash Shukla <amitprakashs@marvell.com>
Subject: RE: [PATCH v3] app/eventdev: support DMA adapter test
Date: Thu, 7 Mar 2024 03:56:17 +0000	[thread overview]
Message-ID: <PH0PR18MB40861476EDAE4E7FFF6C859BDE202@PH0PR18MB4086.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20240306190539.1941756-1-amitprakashs@marvell.com>



> -----Original Message-----
> From: Amit Prakash Shukla <amitprakashs@marvell.com>
> Sent: Thursday, March 7, 2024 12:36 AM
> To: Jerin Jacob <jerinj@marvell.com>
> Cc: dev@dpdk.org; Pavan Nikhilesh Bhagavatula
> <pbhagavatula@marvell.com>; Vamsi Krishna Attunuru
> <vattunuru@marvell.com>; Nithin Kumar Dabilpuram
> <ndabilpuram@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Aakash
> Sasidharan <asasidharan@marvell.com>; Amit Prakash Shukla
> <amitprakashs@marvell.com>
> Subject: [PATCH v3] app/eventdev: support DMA adapter test
> 
> Added performance test support for DMA adapter.
> 
> Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>

With below changes
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

> ---
> v3:
> - Resolved review comments.
> 
> v2:
> - Fixed intel compilation error.
> 
>  app/test-eventdev/evt_common.h       |   3 +
>  app/test-eventdev/evt_main.c         |  15 ++
>  app/test-eventdev/evt_options.c      |  36 ++++
>  app/test-eventdev/evt_options.h      |  12 ++
>  app/test-eventdev/evt_test.h         |   6 +
>  app/test-eventdev/test_perf_atq.c    |  34 +++-
>  app/test-eventdev/test_perf_common.c | 256
> ++++++++++++++++++++++++++-
>  app/test-eventdev/test_perf_common.h |  35 ++--
>  app/test-eventdev/test_perf_queue.c  |  32 +++-
>  doc/guides/tools/testeventdev.rst    |  27 +++
>  10 files changed, 427 insertions(+), 29 deletions(-)
> 
> diff --git a/app/test-eventdev/evt_common.h b/app/test-
> eventdev/evt_common.h
> index fcb3571438..dbe1e5c0c4 100644
> --- a/app/test-eventdev/evt_common.h
> +++ b/app/test-eventdev/evt_common.h
> @@ -9,6 +9,7 @@
>  #include <rte_crypto.h>
>  #include <rte_debug.h>
>  #include <rte_event_crypto_adapter.h>
> +#include <rte_event_dma_adapter.h>
>  #include <rte_eventdev.h>
>  #include <rte_service.h>
> 
> @@ -42,6 +43,7 @@ enum evt_prod_type {
>  	EVT_PROD_TYPE_ETH_RX_ADPTR,  /* Producer type Eth Rx Adapter.
> */
>  	EVT_PROD_TYPE_EVENT_TIMER_ADPTR,  /* Producer type Timer
> Adapter. */
>  	EVT_PROD_TYPE_EVENT_CRYPTO_ADPTR,  /* Producer type Crypto
> Adapter. */
> +	EVT_PROD_TYPE_EVENT_DMA_ADPTR,  /* Producer type DMA
> Adapter. */
>  	EVT_PROD_TYPE_MAX,
>  };
> 
> @@ -86,6 +88,7 @@ struct evt_options {
>  	uint64_t timer_tick_nsec;
>  	uint64_t optm_timer_tick_nsec;
>  	enum evt_prod_type prod_type;
> +	enum rte_event_dma_adapter_mode dma_adptr_mode;
>  	enum rte_event_crypto_adapter_mode crypto_adptr_mode;
>  	enum rte_crypto_op_type crypto_op_type;
>  	enum rte_crypto_cipher_algorithm crypto_cipher_alg;
> diff --git a/app/test-eventdev/evt_main.c b/app/test-eventdev/evt_main.c
> index 13a8500ef7..03114020f1 100644
> --- a/app/test-eventdev/evt_main.c
> +++ b/app/test-eventdev/evt_main.c
> @@ -138,6 +138,14 @@ main(int argc, char **argv)
>  		}
>  	}
> 
> +	/* Test specific dmadev setup */
> +	if (test->ops.dmadev_setup) {
> +		if (test->ops.dmadev_setup(test, &opt)) {
> +			evt_err("%s: dmadev setup failed", opt.test_name);
> +			goto dmadev_destroy;
> +		}
> +	}
> +
>  	/* Test specific eventdev setup */
>  	if (test->ops.eventdev_setup) {
>  		if (test->ops.eventdev_setup(test, &opt)) {
> @@ -171,6 +179,9 @@ main(int argc, char **argv)
>  	if (test->ops.cryptodev_destroy)
>  		test->ops.cryptodev_destroy(test, &opt);
> 
> +	if (test->ops.dmadev_destroy)
> +		test->ops.dmadev_destroy(test, &opt);
> +
>  	if (test->ops.mempool_destroy)
>  		test->ops.mempool_destroy(test, &opt);
> 
> @@ -196,6 +207,10 @@ main(int argc, char **argv)
>  	if (test->ops.cryptodev_destroy)
>  		test->ops.cryptodev_destroy(test, &opt);
> 
> +dmadev_destroy:
> +	if (test->ops.dmadev_destroy)
> +		test->ops.dmadev_destroy(test, &opt);
> +
>  ethdev_destroy:
>  	if (test->ops.ethdev_destroy)
>  		test->ops.ethdev_destroy(test, &opt);
> diff --git a/app/test-eventdev/evt_options.c b/app/test-
> eventdev/evt_options.c
> index 03fb3bfce0..fb5a0a255f 100644
> --- a/app/test-eventdev/evt_options.c
> +++ b/app/test-eventdev/evt_options.c
> @@ -146,6 +146,36 @@ evt_parse_timer_prod_type_burst(struct
> evt_options *opt,
>  	return 0;
>  }
> 
> +static int
> +evt_parse_dma_prod_type(struct evt_options *opt,
> +			   const char *arg __rte_unused)
> +{
> +	opt->prod_type = EVT_PROD_TYPE_EVENT_DMA_ADPTR;
> +
> +	/* Only Forward mode is supported for DMA adapter. */
> +	opt->dma_adptr_mode =
> RTE_EVENT_DMA_ADAPTER_OP_FORWARD;
> +
> +	return 0;
> +}
> +
> +static int
> +evt_parse_dma_adptr_mode(struct evt_options *opt, const char *arg)
> +{
> +	uint8_t mode;
> +	int ret;
> +
> +	ret = parser_read_uint8(&mode, arg);
> +	if (mode != RTE_EVENT_DMA_ADAPTER_OP_FORWARD) {
> +		RTE_LOG(ERR, USER1, "DMA adapter is supported in forward
> mode only\n");
> +		return -EINVAL;
> +	}
> +
> +	opt->dma_adptr_mode =
> RTE_EVENT_DMA_ADAPTER_OP_FORWARD;
> +
> +	return ret;
> +}
> +
> +
>  static int
>  evt_parse_crypto_prod_type(struct evt_options *opt,
>  			   const char *arg __rte_unused)
> @@ -446,6 +476,7 @@ usage(char *program)
>  		"\t--queue_priority   : enable queue priority\n"
>  		"\t--deq_tmo_nsec     : global dequeue timeout\n"
>  		"\t--prod_type_ethdev : use ethernet device as producer.\n"
> +		"\t--prod_type_dmadev : use dma device as producer.\n"
>  		"\t--prod_type_cryptodev : use crypto device as producer.\n"
>  		"\t--prod_type_timerdev : use event timer device as
> producer.\n"
>  		"\t                     expiry_nsec would be the timeout\n"
> @@ -457,6 +488,7 @@ usage(char *program)
>  		"\t--timer_tick_nsec  : timer tick interval in ns.\n"
>  		"\t--max_tmo_nsec     : max timeout interval in ns.\n"
>  		"\t--expiry_nsec      : event timer expiry ns.\n"
> +		"\t--dma_adptr_mode   : 1 for OP_FORWARD mode
> (default).\n"
>  		"\t--crypto_adptr_mode : 0 for OP_NEW mode (default)
> and\n"

Please fixup the text.

>  		"\t                      1 for OP_FORWARD mode.\n"
>  		"\t--crypto_op_type   : 0 for SYM ops (default) and\n"
> @@ -540,9 +572,11 @@ static struct option lgopts[] = {
>  	{ EVT_QUEUE_PRIORITY,      0, 0, 0 },
>  	{ EVT_DEQ_TMO_NSEC,        1, 0, 0 },
>  	{ EVT_PROD_ETHDEV,         0, 0, 0 },
> +	{ EVT_PROD_DMADEV,         0, 0, 0 },
>  	{ EVT_PROD_CRYPTODEV,      0, 0, 0 },
>  	{ EVT_PROD_TIMERDEV,       0, 0, 0 },
>  	{ EVT_PROD_TIMERDEV_BURST, 0, 0, 0 },
> +	{ EVT_DMA_ADPTR_MODE,      1, 0, 0 },
>  	{ EVT_CRYPTO_ADPTR_MODE,   1, 0, 0 },
>  	{ EVT_CRYPTO_OP_TYPE,	   1, 0, 0 },
>  	{ EVT_CRYPTO_CIPHER_ALG,   1, 0, 0 },

<snip>

  reply	other threads:[~2024-03-07  3:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 13:26 [PATCH] " Amit Prakash Shukla
2024-02-28  6:01 ` [PATCH v2] " Amit Prakash Shukla
2024-03-01 12:57   ` Pavan Nikhilesh Bhagavatula
2024-03-01 14:42     ` Amit Prakash Shukla
2024-03-06 19:05   ` [PATCH v3] " Amit Prakash Shukla
2024-03-07  3:56     ` Pavan Nikhilesh Bhagavatula [this message]
2024-03-12 13:10       ` Jerin Jacob
2024-03-12 14:30     ` [PATCH v4] " Amit Prakash Shukla
2024-03-13 13:18       ` Jerin Jacob

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=PH0PR18MB40861476EDAE4E7FFF6C859BDE202@PH0PR18MB4086.namprd18.prod.outlook.com \
    --to=pbhagavatula@marvell.com \
    --cc=amitprakashs@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=asasidharan@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=vattunuru@marvell.com \
    /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).