From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7638D45908; Thu, 5 Sep 2024 05:49:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 424B840264; Thu, 5 Sep 2024 05:49:06 +0200 (CEST) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id 424D94025C for ; Thu, 5 Sep 2024 05:49:05 +0200 (CEST) Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Wzlb84cnJz20nVH; Thu, 5 Sep 2024 11:44:04 +0800 (CST) Received: from dggpeml500024.china.huawei.com (unknown [7.185.36.10]) by mail.maildlp.com (Postfix) with ESMTPS id 800B91A016C; Thu, 5 Sep 2024 11:49:02 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 5 Sep 2024 11:49:02 +0800 Subject: Re: [PATCH] app/dma-perf: per device config support To: Amit Prakash Shukla , Cheng Jiang CC: , , , , References: <20240805135110.2509227-1-amitprakashs@marvell.com> From: fengchengwen Message-ID: <93abc6a3-da6c-ca78-9f2b-8c2b7a5e71c4@huawei.com> Date: Thu, 5 Sep 2024 11:49:02 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20240805135110.2509227-1-amitprakashs@marvell.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500024.china.huawei.com (7.185.36.10) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Hi Amit, It indeed provide more flexible configuration. There is a small comment below, with that fixed, Acked-by: Chengwen Feng 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 > --- ... > > -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