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 58377A00C4; Sun, 24 Apr 2022 05:55:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4663C40141; Sun, 24 Apr 2022 05:55:31 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 1A4224069D for ; Sun, 24 Apr 2022 05:55:28 +0200 (CEST) Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4KmDnK00m2zhYNq; Sun, 24 Apr 2022 11:55:16 +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; Sun, 24 Apr 2022 11:55:27 +0800 Subject: Re: [PATCH v2 3/4] examples/dma: support enqueue drop statistic From: fengchengwen To: Bruce Richardson CC: , , References: <20220411025634.33032-1-fengchengwen@huawei.com> <20220411121459.23898-1-fengchengwen@huawei.com> <20220411121459.23898-4-fengchengwen@huawei.com> Message-ID: <11929a92-22ed-caa0-849f-4b912471b4aa@huawei.com> Date: Sun, 24 Apr 2022 11:55:26 +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: dggems703-chm.china.huawei.com (10.3.19.180) 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 After thinking about it, there are other ways (e.g. dmadump/telemetry) to know which failed, so I think we could drop this patch. I will send v3 for other patches. Thanks. On 2022/4/19 20:09, fengchengwen wrote: > On 2022/4/19 16:45, Bruce Richardson wrote: >> On Sat, Apr 16, 2022 at 02:19:24PM +0800, fengchengwen wrote: >>> DMA is a memcopy engine, and from that perspective, I think it's appropriate >>> to use copy_failures when dma_enqueue fails. >>> >>> The newly added enqueue_failures is mainly used for rte_ring_enqueue_burst >>> failures. >>> >>> Since the app doesn't have a command line, I think adding this field can >>> immediately identify where it failed. >>> >> >> So one stat is for the HW path and the other is for the SW one? If that is >> the case, only one stat should probably be printed out by the app depending >> on the mode is it in. > > For HW path, both copy_failures and enqueue_failures > For SW path, only the enqueue_failure, PS: the value of copy_failures is fixed to be 0 > >> >>> On 2022/4/13 23:01, Bruce Richardson wrote: >>>> On Mon, Apr 11, 2022 at 08:14:58PM +0800, Chengwen Feng wrote: >>>>> The copy drop statistic counted in two scenarios: DMA copy failures and >>>>> enqueue failures. so it is difficult to locate the problem. >>>>> >>>> >>>> Is the app actually tracking copy failures? From a quick glance at the code >>>> it looks to me like the only "copy_failures" are the enqueue failures, in >>>> which case the stat should just be renamed. >>>> >>>>> This patch adds enqueue drop statistic to fix the it. >>>>> >>>>> Signed-off-by: Chengwen Feng >>>>> --- >>>>> examples/dma/dmafwd.c | 14 +++++++++----- >>>>> 1 file changed, 9 insertions(+), 5 deletions(-) >>>>> >>>> >>>> . >>>> >>> >> >> . >> > > > . >