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 DB55245C29; Fri, 1 Nov 2024 04:06:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB9D243283; Fri, 1 Nov 2024 04:06:04 +0100 (CET) Received: from smtpbguseast3.qq.com (smtpbguseast3.qq.com [54.243.244.52]) by mails.dpdk.org (Postfix) with ESMTP id DA10F40265 for ; Fri, 1 Nov 2024 04:06:02 +0100 (CET) X-QQ-mid: Yeas8t1730430353t230t06105 Received: from 3DB253DBDE8942B29385B9DFB0B7E889 (jiawenwu@trustnetic.com [60.177.96.245]) X-QQ-SSF: 0000000000000000000000000000000 From: =?utf-8?b?Smlhd2VuIFd1?= X-BIZMAIL-ID: 325105556382499377 To: "'Ferruh Yigit'" , References: <20241023064836.2017879-1-jiawenwu@trustnetic.com> <20241028023147.60157-1-jiawenwu@trustnetic.com> <20241028023147.60157-8-jiawenwu@trustnetic.com> <03d001db2c02$ba5ac830$2f105890$@trustnetic.com> <8039e56a-a73f-4f7e-ae2a-366ce79071ef@amd.com> In-Reply-To: <8039e56a-a73f-4f7e-ae2a-366ce79071ef@amd.com> Subject: RE: [PATCH v2 07/13] net/txgbe: add Tx descriptor error statistics Date: Fri, 1 Nov 2024 11:05:52 +0800 Message-ID: <03e501db2c0a$f5db80e0$e19282a0$@trustnetic.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQGXIFrpZ1KNQpKKY/LzcUfCKsmTCQHAYxNLAQBVWmQBpt007QDw6ccCAXx2SCGy8yuXMA== Content-Language: zh-cn X-QQ-SENDSIZE: 520 Feedback-ID: Yeas:trustnetic.com:qybglogicsvrgz:qybglogicsvrgz8a-1 X-QQ-XMAILINFO: NlkG4M3ScFLjL9CgZj5P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There: 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 > -----Original Message----- > From: Ferruh Yigit > Sent: Friday, November 1, 2024 10:46 AM > To: Jiawen Wu ; dev@dpdk.org > Subject: Re: [PATCH v2 07/13] net/txgbe: add Tx descriptor error statistics > > On 11/1/2024 2:06 AM, Jiawen Wu wrote: > >>> @@ -4980,6 +4982,7 @@ txgbe_tx_queue_clear_error(void *param) > >>> if (!txq->resetting) > >>> continue; > >>> > >>> + txq->desc_error++; > >>> > >> > >> Why error value is increased in this function, which resets the Tx queue? > >> Is the intention to reset the error value here? > > > > When there is a desc error to cause Tx ring hang, the interrupt directs to > > reset of the queue. So we increase the error count in the specific queue > > reset function. The queue is reset, but the error that led to the resetting > > is recorded. The error count is only reset at the setup function. > > > > Got it. But this variable counts number of bad packets. Increasing it > when Tx ring hang too may be confusing as there are two different > reasons to increase the counter. I think I should add a comment here: /* Increase the count of Tx desc error since it causes the queue reset. */ > Btw, .stats_reset() needs to reset this error stat. I'll add it into .stats_reset() in patch set v3.