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 36B9245C22; Fri, 1 Nov 2024 02:33:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 05E5F43283; Fri, 1 Nov 2024 02:33:34 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2048.outbound.protection.outlook.com [40.107.101.48]) by mails.dpdk.org (Postfix) with ESMTP id 85BAC40265 for ; Fri, 1 Nov 2024 02:33:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=b/60KbFsBqqE/z61we1/qaawDLo6UVLygnWfPPRVaq3qLvTGeHWJs8sgTOHt0k3c0JF+a3SUir9EDj9AHL0VRXRmI0kqZmY5AnaQcjob7zf/ItYTHO+agsrDm0CTYty/+BQkNEeULMd5SCKq17aNd8cJRLkP3bYAXEzNiOQuRpETCHD/AsJuobCpotTRH+QVn4wOeHC8pO+nOzQWD3tv3I+4hHdG7aGh7kMPVTQgP0vwTNCHzqT7YhW3ZsjG15hsy8LXHkLQzT3YmAN8u5BBKPK05pSHvGyiTO61+9e9AJpRByVOh4iDmnLNj+WMMIGEBfZiFdQxaANFRZA6u8d/2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3u75vbQxufc2fHJOqutOAhsy+DGGMRRnlpNyRXKnaNA=; b=sUdDrezsRG67g/5jRoI/vihjUj63lVkLeK2Y4HkEcN0hHbKyZWCgtvWQAI/1HIecoqX6XgJB9euxeDVlsNBMJC/JJ6n/RQlzX+LFqSB1kEhoRLZnN194qm/Iq1JAnxek0iKCV6SFI2gLIzf3OMlCyOumNtjV00fYvlx4wpzh2+ftAYdSLuup8WN+ieEJoYLdd2H7aCP6Th5GuukMp1BNqur6O54lrdJiBrXZk1juMoBn3u4HKmEYNydImxf68/JecsklBVqaJLgd4FuM0wexhYtpwV+8w9xG2Z6s1SJqYVGBtUD+wK9NRKEzbGYYChnjZ3n9zbc0uNa2gFMBj6O3jQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3u75vbQxufc2fHJOqutOAhsy+DGGMRRnlpNyRXKnaNA=; b=H9JZ78E59we1i1uTpOxAIXgKePUuaPEeVpvB7fk4nXsXjxcyGumMHX6ZNQ92mzhO33m3lnpaWpmv1aoXfzK/xH/bxNetqJ74PlGic7ezhQ+9PNUkfISy484/oGfs8T96h6p75m1xCh6IA1FHbX+2uXPrr4skIgG5ADZUJ0tiqTU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from SJ2PR12MB8830.namprd12.prod.outlook.com (2603:10b6:a03:4d0::9) by PH7PR12MB7453.namprd12.prod.outlook.com (2603:10b6:510:20a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Fri, 1 Nov 2024 01:33:30 +0000 Received: from SJ2PR12MB8830.namprd12.prod.outlook.com ([fe80::c3eb:df02:eaa9:2055]) by SJ2PR12MB8830.namprd12.prod.outlook.com ([fe80::c3eb:df02:eaa9:2055%4]) with mapi id 15.20.8093.024; Fri, 1 Nov 2024 01:33:29 +0000 Message-ID: Date: Fri, 1 Nov 2024 01:33:24 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 07/13] net/txgbe: add Tx descriptor error statistics To: Jiawen Wu , dev@dpdk.org References: <20241023064836.2017879-1-jiawenwu@trustnetic.com> <20241028023147.60157-1-jiawenwu@trustnetic.com> <20241028023147.60157-8-jiawenwu@trustnetic.com> Content-Language: en-US From: Ferruh Yigit In-Reply-To: <20241028023147.60157-8-jiawenwu@trustnetic.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0264.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::36) To SJ2PR12MB8830.namprd12.prod.outlook.com (2603:10b6:a03:4d0::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR12MB8830:EE_|PH7PR12MB7453:EE_ X-MS-Office365-Filtering-Correlation-Id: 9dbb4f1a-4081-4506-3f96-08dcfa1530a4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?NTJUeGdJMkNMdUJLbElvRjZaa3pla3g3d2tGbE5NWFExcFhGQ0xjeU1nbXY4?= =?utf-8?B?RmNLaWZDMmkvZ2krU3FQcVVWUDF4RnY1T1gzZktnZjNIemNGMURYL0dhMTdD?= =?utf-8?B?bzYxZy9sRW1acllLeklrYzNBSjRaNzBQTC9odlZTbk9ySFV1SnRrVFF5aHZY?= =?utf-8?B?VVNrOEwzMWhrclp5M3lxejhyZ3RabE0xdll3eHpoNitKNzZqUDRsUTBWRGRB?= =?utf-8?B?bzNMeGpwVlpnbm1kaWVQZCtIb0ZvNlBoUmRYMkpKa0VYQU85aks1SVU2UWx0?= =?utf-8?B?TW02d2MzMnFiei9rNUJGM0g1eTNOU3BMcHhTODhLbU9YdU9jNDFaRjVCN1h1?= =?utf-8?B?OWcvVDl5eVhNMkJjN3c3ZWNOdkNDVUhBVElScGk4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NV254MXZSMlllSnd1MXBvUEc0Ym1WNGc4?= =?utf-8?B?VkRUYzhTSjFJWXg3MlFTRmdEWnRMNnZhWWFMaEFrT2tOS3p6RDhOWHR6dXRJ?= =?utf-8?B?KzkxSi9RT0JBK1hsZDVjSUE1YUNjVEkxYVhxbWl4Rlg0ZFBGa1NXWHYwSEx5?= =?utf-8?B?bzNpOUtvTUxoM0RyN0hBRmdQU2VDWnR6MWYzZHZ5WHZHUVpqTmlsRnJIbU9J?= =?utf-8?B?QWtuSFRNanE1RExBYXJXSTdxaG9NSStVWkpGdndSdTNSWmtCTjFyd2hNRnUw?= =?utf-8?B?TE9tOHhDUW80UTZQb1ZxT3dodllFVnVNNVdVL3pwTnlla29SR2J0NFhUcmlZ?= =?utf-8?B?NHFYVS9Ib0RSS2JIT1g1Zkl0V0tnZFAxVmt3a29taTYxekhQSnpGVGZDanZR?= =?utf-8?B?aUVrZXR6ampmZlF2SWJaWTZoQzliYW01blV5SmdJZlU4YSswd0NPT0VWQko2?= =?utf-8?Q?+G5Rp0zGZrdvSGIgBDiS0dws8EI3ySMlpepECAW?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ2PR12MB8830.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?d0dIa0s4YW9hUGd5TThQY3VkUE0yL0hhdkpOVTJWa1NsQmlWdmh6YlJqT25l?= =?utf-8?B?MkkrWkpPVUswR043cWRQN1dmK3owTjIxbVlRWTJRZCtoYUY1YmZWeUJCZVVi?= =?utf-8?B?TWY4SDJKNk1MKzRLRG82SUJjVVlhajNvQTZDS0Zua25QZnIrNk9uYXR4MmZW?= =?utf-8?B?UUdCb1pOdTUwY0RsbHhRdjIweUJ5UGhJeWV3N3lNW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NHWXpLa1F2ek5nSS8xK1hwSG1CK0lDR3RvWEhrcFA0bHF4MFdWWTYy?= =?utf-8?B?dWtLblRzZUFHWHkwamFRTFR5QnR4OHBTdnpFSHVJYUZpUzUzMXZMRFRIU0pT?= =?utf-8?Q?cvzqYoynEnoCBzWUHJ0KtNvTT?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9dbb4f1a-4081-4506-3f96-08dcfa1530a4 X-MS-Exchange-CrossTenant-AuthSource: SJ2PR12MB8830.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2024 01:33:29.9041 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7R5pq4PtqLLYLIp3wKdzFXoRY0IuKwrjG964ntUAWeztjXsTqQm3GbNJYIvo5Pyd X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7453 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 On 10/28/2024 2:31 AM, Jiawen Wu wrote: > Count the number of packets not sent due to Tx descriptor error. > > Signed-off-by: Jiawen Wu > --- > drivers/net/txgbe/txgbe_ethdev.c | 6 ++++++ > drivers/net/txgbe/txgbe_rxtx.c | 3 +++ > drivers/net/txgbe/txgbe_rxtx.h | 1 + > 3 files changed, 10 insertions(+) > > diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c > index bafa9cf829..0c76e986f4 100644 > --- a/drivers/net/txgbe/txgbe_ethdev.c > +++ b/drivers/net/txgbe/txgbe_ethdev.c > @@ -2344,6 +2344,7 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) > struct txgbe_hw_stats *hw_stats = TXGBE_DEV_STATS(dev); > struct txgbe_stat_mappings *stat_mappings = > TXGBE_DEV_STAT_MAPPINGS(dev); > + struct txgbe_tx_queue *txq; > uint32_t i, j; > > txgbe_read_stats_registers(hw, hw_stats); > @@ -2398,6 +2399,11 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) > > /* Tx Errors */ > stats->oerrors = 0; > + for (i = 0; i < dev->data->nb_tx_queues; i++) { > + txq = dev->data->tx_queues[i]; > + stats->oerrors += txq->desc_error; > + } > + stats_get is implemented, but stats_reset also needs to be implemented for this stat. > return 0; > } > > diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c > index 06acbd0881..fc9e7b14f5 100644 > --- a/drivers/net/txgbe/txgbe_rxtx.c > +++ b/drivers/net/txgbe/txgbe_rxtx.c > @@ -894,6 +894,7 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, > tx_pkt = *tx_pkts++; > if (txgbe_check_pkt_err(tx_pkt)) { > rte_pktmbuf_free(tx_pkt); > + txq->desc_error++; > continue; > } > > @@ -2523,6 +2524,7 @@ txgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, > txgbe_set_tx_function(dev, txq); > > txq->ops->reset(txq); > + txq->desc_error = 0; > > dev->data->tx_queues[queue_idx] = txq; > > @@ -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? > txgbe_dev_save_tx_queue(hw, i); > > /* tx ring reset */ > diff --git a/drivers/net/txgbe/txgbe_rxtx.h b/drivers/net/txgbe/txgbe_rxtx.h > index e668b60b1e..622a0d3981 100644 > --- a/drivers/net/txgbe/txgbe_rxtx.h > +++ b/drivers/net/txgbe/txgbe_rxtx.h > @@ -412,6 +412,7 @@ struct txgbe_tx_queue { > /**< indicates that IPsec TX feature is in use */ > #endif > const struct rte_memzone *mz; > + uint64_t desc_error; > bool resetting; > }; >