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 57CA143FAF; Tue, 7 May 2024 15:49:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28649402C8; Tue, 7 May 2024 15:49:00 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2086.outbound.protection.outlook.com [40.107.243.86]) by mails.dpdk.org (Postfix) with ESMTP id E6BC7402B1 for ; Tue, 7 May 2024 15:48:57 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UH+5MnF7r3fm1Zt25vltlOfXiTGifUN0jLq7fRgTrSGvnoMII/mqb3ng24Q30RxQzTSUmIPXDHNa2gzvgUecZeurDJAAQc/Z4WjGsPQksLOsnfSTpIKtOg+kC/qfS62f7ty/la7m5Z5EfMwq72OkfQumsgRGlLUoSc2nn4XyII6b0jgHa9xuk70kfRcUOSiTgXH/HAChkSbwkqrgXoiowjG8cX1hefrCUvZt8G+Sh9Eg8VGLO88NLByT7KMkCdK1mwfKiucchXCzZCGCgGNcOM0lea1ks8d9DN11yt9YvVTbh8GM6nDoIexUybzbUMCrR/pSIj5Y7RjdtDpmGMctlA== 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=+pJbpXxduIprY7KjAm0pqTc0butvJtnlUzM4Wly4kz4=; b=IvtbJFbz/Xc6hvJcvKoJ3pKkw3ZgkCpNAy6gzjz+E2CY1HVYTe1Re8T+1ozfC46TA1JPP7ll31cS2bHg1XPNTUZJHz1T+pZUlBP6/RrKDL4djWSUojnd1VftByQYUCQMgHwMIAEl8StHY8c8Gh7E0Zmm9dSFfxgbOM2cYrTCtVBlG53kbIzJghH5A55SCIMoItOrUsIvXvCGxw/LC9gRny5gQcumz56QnZeG8SydSrXou+SL5JOYUjhN0s+6v91HUZR8K3K5OjniR0sZFtlXqAbejMTImatolfSp49Y/Cy96XmdxiTBpFech0dqIoNJkFZvL6PXKMnj/oV/t3dqlzg== 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=+pJbpXxduIprY7KjAm0pqTc0butvJtnlUzM4Wly4kz4=; b=5ufO1meidZJRvLFpz63DcsQ9uNmjDN5rVDFAbdC4SrBQdDIGrFTfA6ctKP0dhohvKDv8TLIVcmGTl5Fa9QAjBbLOkZutW7mrdD4Q3xhK+bLGJMLUR3q0RKqJbFsKKk/4sPBeQsyAHL2QMpupQ2WoaCyrLSCEtwmz7Ee1wRr3lhs= 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 CY8PR12MB7609.namprd12.prod.outlook.com (2603:10b6:930:99::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Tue, 7 May 2024 13:48:55 +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.7544.041; Tue, 7 May 2024 13:48:55 +0000 Message-ID: <44f2d6b8-9b38-4e1f-9d9a-46d719532808@amd.com> Date: Tue, 7 May 2024 14:48:51 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [RFC v3] net/af_packet: make stats reset reliable To: Stephen Hemminger Cc: "John W. Linville" , Thomas Monjalon , dev@dpdk.org, =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , =?UTF-8?Q?Morten_Br=C3=B8rup?= , Honnappa Nagarahalli References: <20240425174617.2126159-1-ferruh.yigit@amd.com> <20240503154547.392069-1-ferruh.yigit@amd.com> <20240503150011.55681b97@hermes.local> 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 aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgA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3qwV7i9VrseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20240503150011.55681b97@hermes.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DUZPR01CA0129.eurprd01.prod.exchangelabs.com (2603:10a6:10:4bc::12) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CY8PR12MB7609:EE_ X-MS-Office365-Filtering-Correlation-Id: 8ae2680a-2030-4bc9-2956-08dc6e9c6ff1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|1800799015; X-Microsoft-Antispam-Message-Info: =?utf-8?B?ZWZSUTlYMEFpQXM1M0ZZTHA0Y1ZUd1dia0MrV3RiaWg2NmtNaU1NZVZYb2p1?= =?utf-8?B?NjI2STUzam4vQ25sZVVJOTlnOWR3S2dQY3Y5bE5UcmNvR2hHcjJjQTd3RjBa?= =?utf-8?B?ZVBaRmEwV3BEbS9oL1hLcHQ0aGtKUlNVOXdwWTBvWldxeDVHQjkvSnAwUVp6?= =?utf-8?B?MGRjOVV1Z0Vway83bW9xUVNqM1JWUkhXaHdqVlFLbktiYWJ3RWdVUGl0aDdt?= =?utf-8?B?QXNsNFV6ZTFhSGZtZHpBcWFrbm0ydTJlUmJMZ0RQNDU1c1lhSTBNaUFYeURO?= =?utf-8?B?K2VKaUdkMjF3b3RyYXZkajlNSlNuUk8yamp0NkRSdHBlV1VYQXVSV3h0Rm5X?= =?utf-8?B?UU02THhkV2c4cmlOS1BtS0l4aFlVdlJKN0RreFRObUVUTjBtSmE3VVp3WVlh?= =?utf-8?B?ZkMrZkRJVjdNND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8?B?bXVXeVBDVFdSbzhXZGtpMEl2cHI5K0w1M0Q2dG8yZ1J4TzV4YUZFMFk4WnFS?= =?utf-8?B?Q2lEbXJlSFJvYXQ0RUpHbmJPY1UrbjM2TVFtd0FLMlp5eUFBZkxkdzdEeEtl?= =?utf-8?B?dy9KZisrSEdPWUpEQVpUSGtvajJ3Y2lJSmxFSTVaSG9yT0dLV3kzWkZ5Zy9J?= =?utf-8?B?b2VXYlFyUGI0QVdQMXp5eVRnenBCam80ZzlKZm5zQnp3Yjk0d1lqWnRhYlpp?= =?utf-8?B?SVZncExVS3VscW1zM0srek8yc1VDR3ErdGJjNjBsTnNrVUNpRG9iRUZNZ3Vz?= =?utf-8?Q?hlGbAU5qk+KJUrc63i+fCbtvnsZE8F7ptQtElDFP2ScM=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)(366007)(376005)(1800799015); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cThKRlFUekNYRG9BWUR2MlNtTzY0OVZyTmZOYW1YMTErd0lYRWhzaTdWODNQ?= =?utf-8?B?TXZ3TXFLamxpVXVGOC9oTWN5OFh5Y1AwUWttZW1xbk0zc1o0TWsvYURKV0lS?= =?utf-8?B?cmdCZ1VuV3BxWGl4TThnMGNmWFZCMERmSE9QOWhTaUtGelBhWjk3VGcrMmRP?= =?utf-8?B?RHRZWmkxVW93UUFqQXFTZEtBbkhpeEtkcHhXZU40MVBLUlBnK0UrRDBXYlVt?= =?utf-8?B?QXpYQ0pOUk5ZdkIveVl0Z2d4Z0NyOTJ0Mlh3b0V5Rzh3bjFwTCtQbjlCVVVC?= =?utf-8?B?a3JmYzJScS84TXA0dFJYVzZCQWpCajFuWnV0MG9xL3lRYkVqck1pYW1he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v1QfpwI?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ae2680a-2030-4bc9-2956-08dc6e9c6ff1 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2024 13:48:55.4292 (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: aaXlzw/QVi9Ne8QUMGOOOOcrepClsTykLrukpRIdLq79FWD64tp4MQyeEcdYI4+Y X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7609 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 5/3/2024 11:00 PM, Stephen Hemminger wrote: > On Fri, 3 May 2024 16:45:47 +0100 > Ferruh Yigit wrote: > >> For stats reset, use an offset instead of zeroing out actual stats values, >> get_stats() displays diff between stats and offset. >> This way stats only updated in datapath and offset only updated in stats >> reset function. This makes stats reset function more reliable. >> >> As stats only written by single thread, we can remove 'volatile' qualifier >> which should improve the performance in datapath. >> >> While updating around, 'igb_stats' parameter renamed as 'stats'. >> >> Signed-off-by: Ferruh Yigit >> --- >> Cc: Mattias Rönnblom >> Cc: Stephen Hemminger >> Cc: Morten Brørup >> >> This update triggered by mail list discussion [1]. >> >> [1] >> https://inbox.dpdk.org/dev/3b2cf48e-2293-4226-b6cd-5f4dd3969f99@lysator.liu.se/ > > > NAK > > I did not hear a good argument why atomic or volatile was necessary in the first place. > Why? > Sure, the patch is done as RFC intentionally to discuss the approach. Agree that volatile and atomics (fetch + add + store) is not required for thread synchronization, as only one CPU updates stats. Even this understanding is important because there are PMDs using full atomics for stats update, like null PMD [1], this will help up clear them. And there is a case, stats reset and stats updated in different threads simultaneously, for this 'volatile' is not sufficient anyway and full atomics is required. As this will cause performance impact we are already saying stats update and reset can't happen at the same time [2]. With this update volatile and atomics are not required for this case too. (Also using offset to increase stats reset reliability.) In this patch volatile replaced with atomic load and atomic store (not atomic fetch and add), to ensure that stats stored to memory and not kept in device registers only. With volatile, it is guaranteed that updated stats stored back to memory, but without volatile and atomics I am not sure if this is guaranteed. Practically I can see this working, but theoretically not sure. This is similar concern with change in your patch that is casting to volatile to ensure value read from memory [3]. Expectation is, only atomics load and store will have smaller performance impact than volatile, ensuring memory load and store when needed. [1] https://git.dpdk.org/dpdk/tree/drivers/net/null/rte_eth_null.c?h=v24.03#n105 [2] https://patches.dpdk.org/project/dpdk/patch/20240425165308.1078454-1-ferruh.yigit@amd.com/ [3] https://inbox.dpdk.org/dev/20240430154129.7347-1-stephen@networkplumber.org/ `#define READ_ONCE(var) (*((volatile typeof(var) *)(&(var))))` > Why is this driver special (a snowflake) compared to all the other drivers doing software > statistics (tap, virtio, xdp, ring, memif, netvsc, vmware)? > Nothing special at all, only discussion started based on af_packet implementation. If we give a decision based on this RFC, same logic can be followed with existing or new software PMDs.