DPDK patches and discussions
 help / color / mirror / Atom feed
From: fengchengwen <fengchengwen@huawei.com>
To: Amit Prakash Shukla <amitprakashs@marvell.com>,
	Cheng Jiang <honest.jiang@foxmail.com>
Cc: <dev@dpdk.org>, <jerinj@marvell.com>, <vattunuru@marvell.com>,
	<anoobj@marvell.com>, <gmuthukrishn@marvell.com>
Subject: Re: [PATCH] app/dma-perf: per device config support
Date: Thu, 5 Sep 2024 11:49:02 +0800	[thread overview]
Message-ID: <93abc6a3-da6c-ca78-9f2b-8c2b7a5e71c4@huawei.com> (raw)
In-Reply-To: <20240805135110.2509227-1-amitprakashs@marvell.com>

Hi Amit,

It indeed provide more flexible configuration.

There is a small comment below, with that fixed,
Acked-by: Chengwen Feng <fengchengwen@huawei.com>

Thanks

On 2024/8/5 21:51, Amit Prakash Shukla wrote:
> Add support to configure device specific config parameters for a
> testcase. Example:
> 
> lcore_dma0=lcore=11,dev=0000:00:04.1,dir=mem2dev,raddr=0x300000000,
> coreid=1,pfid=2,vfid=3
> lcore_dma1=lcore=12,dev=0000:00:04.2,dir=dev2mem,raddr=0x200000000,
> coreid=3,pfid=2,vfid=1
> 
> Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
> ---

...

>  
> -static int populate_pcie_config(const char *key, const char *value, void *test)
> +static int populate_dma_dev_config(const char *key, const char *value, void *test)
>  {
> -	struct test_configure *test_case = (struct test_configure *)test;
> +	struct lcore_dma_config *dma_config = (struct lcore_dma_config *)test;
> +	struct vchan_dev_config *vchan_config = &dma_config->vchan_dev;
> +	struct lcore_dma_map_t *lcore_map = &dma_config->lcore_dma_map;
>  	char *endptr;
>  	int ret = 0;
>  
> -	if (strcmp(key, "raddr") == 0)
> -		test_case->vchan_dev.raddr = strtoull(value, &endptr, 16);
> +	if (strcmp(key, "lcore") == 0)
> +		lcore_map->lcore = (uint8_t)atoi(value);

Suggest use uint16_t, because maybe >=256 cores



  reply	other threads:[~2024-09-05  3:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-05 13:51 Amit Prakash Shukla
2024-09-05  3:49 ` fengchengwen [this message]
2024-09-26 12:13 ` [PATCH v2] " Amit Prakash Shukla
2024-10-21  8:37   ` Amit Prakash Shukla

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=93abc6a3-da6c-ca78-9f2b-8c2b7a5e71c4@huawei.com \
    --to=fengchengwen@huawei.com \
    --cc=amitprakashs@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=gmuthukrishn@marvell.com \
    --cc=honest.jiang@foxmail.com \
    --cc=jerinj@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).