From: "Jiang, Cheng1" <cheng1.jiang@intel.com>
To: Amit Prakash Shukla <amitprakashs@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "jerinj@marvell.com" <jerinj@marvell.com>
Subject: RE: [PATCH 1/2] app/dma-perf: skip support in dma-perf application
Date: Thu, 21 Sep 2023 03:00:01 +0000 [thread overview]
Message-ID: <SN7PR11MB70196E368B242377D8836B3EDCF8A@SN7PR11MB7019.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230807130621.2023043-1-amitprakashs@marvell.com>
Hi,
> -----Original Message-----
> From: Amit Prakash Shukla <amitprakashs@marvell.com>
> Sent: Monday, August 7, 2023 9:06 PM
> To: Jiang, Cheng1 <cheng1.jiang@intel.com>
> Cc: dev@dpdk.org; jerinj@marvell.com; Amit Prakash Shukla
> <amitprakashs@marvell.com>
> Subject: [PATCH 1/2] app/dma-perf: skip support in dma-perf application
>
> Add support to skip running a dma-perf test-case.
>
Sorry for the late reply.
Generally I like your idea. But I might not be able to review in a timely manner, as I'm leaving Intel.
If you're in a hurry, you might need to find someone else to help with the review.
Thanks for your work,
Cheng
> Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
> ---
> app/test-dma-perf/config.ini | 2 ++
> app/test-dma-perf/main.c | 23 +++++++++++++++++++++++
> app/test-dma-perf/main.h | 1 +
> 3 files changed, 26 insertions(+)
>
> diff --git a/app/test-dma-perf/config.ini b/app/test-dma-perf/config.ini
> index b550f4b23f..4d59234b2a 100644
> --- a/app/test-dma-perf/config.ini
> +++ b/app/test-dma-perf/config.ini
> @@ -36,6 +36,8 @@
> ; If you do not specify a result file, one will be generated with the same
> name as the configuration ; file, with the addition of "_result.csv" at the end.
>
> +; "skip" To skip a test-case set skip to 1.
> +
> [case1]
> type=DMA_MEM_COPY
> mem_size=10
> diff --git a/app/test-dma-perf/main.c b/app/test-dma-perf/main.c index
> e5bccc27da..61260fa072 100644
> --- a/app/test-dma-perf/main.c
> +++ b/app/test-dma-perf/main.c
> @@ -320,6 +320,7 @@ load_configs(const char *path)
> const char *case_type;
> const char *lcore_dma;
> const char *mem_size_str, *buf_size_str, *ring_size_str,
> *kick_batch_str;
> + const char *skip;
> int args_nr, nb_vp;
> bool is_dma;
>
> @@ -339,6 +340,13 @@ load_configs(const char *path)
> for (i = 0; i < nb_sections; i++) {
> snprintf(section_name, CFG_NAME_LEN, "case%d", i + 1);
> test_case = &test_cases[i];
> +
> + skip = rte_cfgfile_get_entry(cfgfile, section_name, "skip");
> + if (skip && (atoi(skip) == 1)) {
> + test_case->is_skip = true;
> + continue;
> + }
> +
> case_type = rte_cfgfile_get_entry(cfgfile, section_name,
> "type");
> if (case_type == NULL) {
> printf("Error: No case type in case %d, the test will be
> finished here.\n", @@ -523,6 +531,21 @@ main(int argc, char *argv[])
>
> printf("Running cases...\n");
> for (i = 0; i < case_nb; i++) {
> + if (test_cases[i].is_skip) {
> + printf("Test case %d configured to be skipped.\n\n", i
> + 1);
> + snprintf(output_str[0], MAX_OUTPUT_STR_LEN,
> "Skip the test-case %d\n",
> + i + 1);
> +
> + fd = fopen(rst_path_ptr, "a");
> + if (!fd) {
> + printf("Open output CSV file error.\n");
> + return 0;
> + }
> + output_csv(true);
> + fclose(fd);
> + continue;
> + }
> +
> if (!test_cases[i].is_valid) {
> printf("Invalid test case %d.\n\n", i + 1);
> snprintf(output_str[0], MAX_OUTPUT_STR_LEN,
> "Invalid case %d\n", i + 1); diff --git a/app/test-dma-perf/main.h b/app/test-
> dma-perf/main.h index f65e264378..be89cb2b65 100644
> --- a/app/test-dma-perf/main.h
> +++ b/app/test-dma-perf/main.h
> @@ -41,6 +41,7 @@ struct lcore_dma_map_t {
>
> struct test_configure {
> bool is_valid;
> + bool is_skip;
> uint8_t test_type;
> const char *test_type_str;
> uint16_t src_numa_node;
> --
> 2.25.1
prev parent reply other threads:[~2023-09-21 3:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 13:06 Amit Prakash Shukla
2023-08-07 13:06 ` [PATCH 2/2] app/dma-perf: add PCI device support Amit Prakash Shukla
2023-09-21 3:00 ` Jiang, Cheng1
2023-09-21 3:00 ` Jiang, Cheng1 [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=SN7PR11MB70196E368B242377D8836B3EDCF8A@SN7PR11MB7019.namprd11.prod.outlook.com \
--to=cheng1.jiang@intel.com \
--cc=amitprakashs@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@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).