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 2EE10A0093; Mon, 11 Apr 2022 14:23:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 18F3B4068C; Mon, 11 Apr 2022 14:23:33 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id B01AA40685 for ; Mon, 11 Apr 2022 14:23:31 +0200 (CEST) Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4KcSdb6vz0zgYcP; Mon, 11 Apr 2022 20:21:39 +0800 (CST) Received: from [127.0.0.1] (10.67.100.224) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 11 Apr 2022 20:23:27 +0800 Subject: Re: [PATCH 4/4] examples/dma: add minimal copy size parameter To: Bruce Richardson CC: , , References: <20220411025634.33032-1-fengchengwen@huawei.com> <20220411025634.33032-5-fengchengwen@huawei.com> From: fengchengwen Message-ID: Date: Mon, 11 Apr 2022 20:23:27 +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: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.100.224] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected 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 Bruce, already fix in v2, Thanks. On 2022/4/11 17:27, Bruce Richardson wrote: > On Mon, Apr 11, 2022 at 10:56:34AM +0800, Chengwen Feng wrote: >> This patch adds minimal copy size parameter(-m/--min-copy-size), so >> when do copy by CPU or DMA, the real copy size will be the maximum of >> mbuf's data_len and this parameter. >> >> This parameter was designed to compare the performance between CPU copy >> and DMA copy. User could send small packets with a high rate to drive >> the performance test. >> >> Signed-off-by: Chengwen Feng > > Hi, > > few comments inline below. > > /Bruce > >> --- >> examples/dma/dmafwd.c | 27 ++++++++++++++++++++++++--- >> 1 file changed, 24 insertions(+), 3 deletions(-) >> >> diff --git a/examples/dma/dmafwd.c b/examples/dma/dmafwd.c >> index 6b1b777cb8..83094ba378 100644 >> --- a/examples/dma/dmafwd.c >> +++ b/examples/dma/dmafwd.c >> @@ -25,6 +25,7 @@ >> #define CMD_LINE_OPT_RING_SIZE "ring-size" >> #define CMD_LINE_OPT_BATCH_SIZE "dma-batch-size" >> #define CMD_LINE_OPT_FRAME_SIZE "max-frame-size" >> +#define CMD_LINE_OPT_COPY_SIZE "min-copy-size" > > While I'm not sure this strictly belongs in an example app to show use of > dmadev, I can see the value of it. However, I suggest we need to make it > clearer that it's not directly relevant to the normal use of the app. I > suggest making the parameter "force-min-copy-size" to make it clearer that > it's an explicit override. > >> #define CMD_LINE_OPT_STATS_INTERVAL "stats-interval" >> >> /* configurable number of RX/TX ring descriptors */ >> @@ -119,6 +120,7 @@ static volatile bool force_quit; >> >> static uint32_t dma_batch_sz = MAX_PKT_BURST; >> static uint32_t max_frame_size; ... >> @@ -576,6 +585,7 @@ dma_usage(const char *prgname) >> printf("%s [EAL options] -- -p PORTMASK [-q NQ]\n" >> " -b --dma-batch-size: number of requests per DMA batch\n" >> " -f --max-frame-size: max frame size\n" >> + " -m --min-copy-size: minimum copy length\n" > > The help text needs to be expanded, again to make clear that this is for > perf comparison and the like. Something like "Force a minimum copy length, > even for smaller packets" > > > . >