Hi Amit,

It indeed provide more flexible configuration.

There is a small comment below, with that fixed,
Acked-by: Chengwen Feng <fengcheng...@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 <amitpraka...@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 via email to