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 3EAE843F06; Fri, 26 Apr 2024 15:37:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28ECD43DB6; Fri, 26 Apr 2024 15:37:55 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2071.outbound.protection.outlook.com [40.107.223.71]) by mails.dpdk.org (Postfix) with ESMTP id 808D343DB0 for ; Fri, 26 Apr 2024 15:37:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H1luYcbNdeKpDFbbPhQ3ZzEO+EgXZ9vq/nzNY2hZgF5zW+rtdWpsyL4eiXVoDr3HJLWbeT2jpNm3ZueFV52S+Za0lkg7DAmjkgy1KU8dhivKHIkTaafZfxhSS5oD2AHg+c2+ZkH2i6g7ca+OfeMToUHY2kMwLklGlPlPQakEu8FEXPrFUiQlJEgpgA4L3qfNxIOI4YgRvqK7aqHS4yiA2cBCtfLgrIFcwn6gnt7TuqRw2oCeiYHCT/5Ihau/VWCebssGcsX0TJZg4HkmqN3A5sKwZWtHg0nEPwgTnyCiIEwskkClKoZlYLkLXNdjIZbu5pwPsG3PObTewSlf1uz3qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=EajQtXL9crBRMmdxuckqAeAM3O/sTcfjvF/otTh5q2k=; b=m1AIAiqzXNtmFhpwABkmY4VX4+tM7WfWKxdppsMrPgS+zNLGuuDhwLmjBTHhkdHDOI5y+ptguhWDMaL+iazZLJuVq2eODy9NX2L/ST4bF7dQNfS09cYJc1ZXKAyEY4lhfiB5wMH+/ONuZVhZi2zUF6m8okuh/QZpCg1Z59PZcGo4ui+LN5VKWK8DRoUW0X9o58ocavIaJtLYgixgzHsCoOwE2OS+bWYpVPXNBTKhXzMl1sA3gKem+7eW9/7A/+XJZOwj9GVY8ygEpV3/vSl1FFMp09pw/WEbZUt9lLhYAyrgAV5dvdt2ZuBMsD3kg5LBR7VVXC+kyOQTuK/02AalrQ== 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=EajQtXL9crBRMmdxuckqAeAM3O/sTcfjvF/otTh5q2k=; b=VS//Ekm9lLS9ErFJXy4aq1KQMt1RbssnjJOvUw97Mqn2EAY0Css10UkJMFmPsUIa27GZmfTOdyRZVgEJ0J0QCRafsf7760K6F+6BKj4B8TZnG9BpdbM9kTCUNAP/L1lKNt9vLHVehCqfPRBGCCNr28U9e8YT5l2EVmvEQ015mg8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by DS0PR12MB6654.namprd12.prod.outlook.com (2603:10b6:8:d1::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.23; Fri, 26 Apr 2024 13:37:51 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::282f:29d3:cac1:cde3]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::282f:29d3:cac1:cde3%7]) with mapi id 15.20.7519.030; Fri, 26 Apr 2024 13:37:50 +0000 Message-ID: Date: Fri, 26 Apr 2024 14:37:47 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [RFC] net/af_packet: make stats reset reliable To: =?UTF-8?Q?Morten_Br=C3=B8rup?= , "John W. Linville" Cc: Thomas Monjalon , dev@dpdk.org, =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , Stephen Hemminger References: <20240425174617.2126159-1-ferruh.yigit@amd.com> <98CBD80474FA8B44BF855DF32C47DC35E9F3F4@smartserver.smartshare.dk> Content-Language: en-US From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFg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hmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F3F4@smartserver.smartshare.dk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DUZPR01CA0165.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b3::6) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DS0PR12MB6654:EE_ X-MS-Office365-Filtering-Correlation-Id: c741ab5b-cf74-47cd-98e4-08dc65f61153 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|366007|1800799015; X-Microsoft-Antispam-Message-Info: =?utf-8?B?UVBuc1RKN3FIaHdjeXR5bGpHdDdJY2hyOVJ1MUVkeWdNUXBqdmJ3NHE1TzV2?= =?utf-8?B?T0FlaExZS2Q5R2JvZE9JdWhNUjVMNVJSR3NxUjJ1VXZSYnZzaGM4UWxmbUQ3?= =?utf-8?B?L2JTRzkzdlEyd3R3ZUxCTnNNRXA3NURoSkpyQmkwS2xISFVzY0p0UzZ6Nnlx?= =?utf-8?B?N3BwT1Nra3ZobUdMV3BNbnBpVFhEZlU1amkza3FyUXhoeGlSdXBmd3hHMkRl?= =?utf-8?B?ZkhYZlFjeGtKaGVvTFNzQ2hyN3lUdklJdTh3RDIwWGZVY3BoY24xcDVEOXhP?= =?utf-8?B?VUlGcDVtSTZIV011cGNLcWhFNXJwdzloY3ZoV1c3OVJocXpXdGxud2taRkZK?= =?utf-8?B?cWcxcDhvWmZDSC9hcVVUMGVhS1MxaDhjai9tdEhoalN1RlNKUE9HTGo5K3B5?= =?utf-8?B?c1Y5ZlZ6bC9RU3JadD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8?B?c21QNWhvMmdPdnJsVXd3SU1sbVpBaHJPQU9VTnlURzJEaWlVVGJ6Z0Q1Yng2?= =?utf-8?B?djZTT1pNMmxPVm9HbHFsVkVpSVdQdkVWVlVuV2Mvejc0SktBZ1VTVUhyNVRI?= =?utf-8?B?NzB6aEhZa0lVMjF6aDBCaU9sekVWUzRPUy9MM0Z6NXRSSFR2c2lnQ3B0eFdU?= =?utf-8?B?cDdYSkpCci9admdvT1NxQ0tuS1BEVVZZcklTZHI0WXJuL2R4UmJWaVZiclZ0?= =?utf-8?B?QkVodkRFUUcrcnRzUUs3UkJ2ai9pQUF1VWFHZ0M1dEJjbzFsbkJoR2N4anFP?= =?utf-8?Q?mwrVaQS3mtSoFSTl8XoD5fQC4O2kgY8AEJaep0IVi0fs=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(366007)(1800799015); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cldYRzUzQU1zS3dlSE5QNEUrWDk4TmdLdlhTUEJTQnJSUzFwbkpsOWV1MDZn?= =?utf-8?B?bENCd3NWS3NraVBGUHNvaXRYL0c5TUpJQWFGR2pkb1JPS3dlMlFyMWpUZ0k2?= =?utf-8?B?VDRLZlJjT1FlUlFJcjlQekxqemcyekFjZ1J1Y1AzNFVWSS9wZ3dqbnN5R0Zu?= =?utf-8?B?dmRGVFVFS09idC9XV3d1bE14ZEx6YmlWMVJkMXJsVlBNZUZwVnZhZjJ0TkJl?= =?utf-8?B?Yk5JUjEyazZGbS9IQUFVV1JiN2lKKytqMmtOQjJTanZIaVBUM0crV2luNWVD?= =?utf-8?B?bE1DTjI1dGVOdm9hVUVYMnhKcHZ6bnpmcmRqT2MzcitocnZObURxRUpBTytl?= =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a0O?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c741ab5b-cf74-47cd-98e4-08dc65f61153 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2024 13:37:50.8933 (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: dAt7QqMbxZOwPp23VqVxBASM4dscYvk+0fIEKLCe8iPXtfvqrnXU8RBHX/EGPjwy X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6654 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 4/26/2024 12:33 PM, Morten Brørup wrote: >> +static uint64_t >> +stats_get_diff(uint64_t stats, uint64_t offset) >> +{ >> + if (stats >= offset) >> + return stats - offset; >> + /* unlikely wraparound case */ >> + return UINT64_MAX + stats - offset; > > The numbers are unsigned, so wrapping comes for free. > > Remove the comparison and always return stats - offset. > > Using uint8_t for easier explanation, if offset is 255 and stats is 0, then the diff should be 1. > Returning stats - offset: > stats - offset = 0 - 255 = 0 - 0xFF = 1. > > Returning UINT8_MAX + stats - offset is wrong: > UINT8_MAX + stats - offset = 255 - 0 - 255 = 0. > > Besides that, it looks good to me. > Yes, it is wrong, and thanks for removing comparison tip. But thinking twice, taking wrapping into account for a uint64_t variable can be being too cautious anyway. I will remove it completely. > > While reviewing, I came across the rx_mbuf_alloc_failed counter in the rte_eth_dev_data structure: > https://elixir.bootlin.com/dpdk/v24.03/source/lib/ethdev/rte_ethdev.c#L3145 > https://elixir.bootlin.com/dpdk/v24.03/source/lib/ethdev/ethdev_driver.h#L127 > > Doesn't it have the same problem? > stats reset problem? af_packet is not collecting 'rx_mbuf_alloc_failed', so nothing to do there for af_packet. > > BTW, the af_packet PMD doesn't increase the rx_mbuf_alloc_failed counter on mbuf allocation failures. But that's a separate bug. > Yes it is missing, but I wouldn't call it a bug, just one of the stats is missing. And yes this can be handled separately if required.