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 53D1643FCC; Tue, 7 May 2024 19:27:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CE318402DF; Tue, 7 May 2024 19:27:45 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2049.outbound.protection.outlook.com [40.107.223.49]) by mails.dpdk.org (Postfix) with ESMTP id 22431402A9 for ; Tue, 7 May 2024 19:27:44 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VG2oWxatj9Fl9uetDNkFP3q36UzT3W21T2rnhXpUt9cat9hEDI9g//tHcIt5wMQHakv+MVUO5KKtRG1jVYRE+57b1+Xr9maGMuvDad6uREDaWfGSNvaOfbAROs99OKZq0E9Gj8jH1DAyDEo0Qxk9efu12tZny6qiOlqPUWjapJUQpyfNyOv9qFCOzLlI+qJpxaqhCMGU4417EQD8mI42Pr6lW/HZLj6GaiIEYA8WfozvmLI26KCDf4ecof7Xfl1c8GRpR2BKpDk6zK4J1R/0c9vo7PAkX9YJ/qgo0JAxlOGkeXu6HsetZsMY5cjcbLstcK5Mai/mZZ8quC5AIjcf3Q== 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=oG2KcODpxRrZI9TVIbcGmFVxFWoVLVKOEf7DIw4O4b4=; b=miv/Yh1e1jko8z4ceojrVsZ/1hLBjO28v4vCZgbcdjNSeSs879jMveUIeOeXzh98xy6QcKTC5VQiHYHs5mMOrD9QpbHFdrPK3POnhHVuPeAvYZBgSoP7gAVwE/2w1EAP/tY0I42oYra9BvvovMU2DcE1B642YdkMWCaT75dRYLxHjFYFWa4x359pP3PuhyOUHyp+vUoVU7Y0jfVYLxJVWCieAA0n6+8mlMdcmXJHzrOJBbDzkuAJRxWYGhECTFhJdOIRaNLDQQs3adfMqxbH+Z6809a0iSRtW5NKz9pC4BFyB01u7wnOqtJqPkPESMeNdIxMV4F2QuI3a+JfIRYMNQ== 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=oG2KcODpxRrZI9TVIbcGmFVxFWoVLVKOEf7DIw4O4b4=; b=twsZFU+BVhMzcQyNuJJ8LHp5MWJH7ejtpT3JLJocqmRvNtIiGyhSpWj3JOc6N1/MCo21YDcrMSYhfBW5yWbZ93U5hq1ppCG0wbXG4txrakiIHu1L1zuDfwRih1cT8Vm2sbtmM2HVTXvZ3dQReAXIB1nHlTBkqsea98cCRjs1bC0= 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 SJ0PR12MB7475.namprd12.prod.outlook.com (2603:10b6:a03:48d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.43; Tue, 7 May 2024 17:27:39 +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 17:27:38 +0000 Message-ID: Date: Tue, 7 May 2024 18:27:33 +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> <44f2d6b8-9b38-4e1f-9d9a-46d719532808@amd.com> <20240507075251.144e91b7@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 aXQgPGZlcnJ1aC55aWd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LUHXF1GlofpGbe1lj4KUJVse5g3qwV7i9VrseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20240507075251.144e91b7@hermes.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0256.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:194::9) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SJ0PR12MB7475:EE_ X-MS-Office365-Filtering-Correlation-Id: 0c64395d-693a-4064-5410-08dc6ebafde5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|1800799015|366007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?OW9HUXozZXJPNTJiUnFUU2RybENWeVJSbXpCZE04c0F2NTZ5UU9CdWE4OW9U?= =?utf-8?B?bUptREkxY2laTkNsVWp0MUpaYkdWZnBzUkpESXBxOGg5elBmNE9lNXFkRksw?= =?utf-8?B?RlA3Y3NaNWpiZjFMTDFTdFFPWDg1SnRranBUV3pYbWZKZEpSdzY2TjVKcmpP?= =?utf-8?B?NnhoYWM2bmVuQ3hnYVNkOVM3TUxJUnp4Tk5KMGNDcEg1d2pPTWRzTFd1SDBE?= =?utf-8?B?MWo1UURxMmR4ODZzQzlZa2RNWkZHZUNUai9vb0tNSXhDZDFzQlZvVDFlaytx?= =?utf-8?B?NHNHb096SEtEZlkzUTNRSldTcGM2T09aUEI1bHlOM1RnYXVROHV1Tm91UEJa?= =?utf-8?B?c0lkWWY3V0hNc0NqVENFZ3loOWZTV2dGNWdnK0lZaVpjN0drT1JEdTErU21k?= =?utf-8?B?UEVJUXBXL1hW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0lqVVhK?= =?utf-8?B?R3pGU05Kb2hrN1ZZYkxDZUFITVhPdDRDSjkrOUd4RmpCY21QbkI0TFZRSDRW?= =?utf-8?B?aThwaEtNNVFBZUU3NVVjVVFPQ1ExOWt4ekRPV3pkaUUwemp2emdDM3NIa0t3?= =?utf-8?B?aUUyN0E2QWJZUVVQczVodUY1S0xMWXk1cXdJMjJxQ0RuNzBBSit5YUpVQlRT?= =?utf-8?B?MGpkV2NDaUNnSEVSb2pkN2M5OFZ6WGsyWENqVzR1NGZCVDNheWtESDZjWWRN?= =?utf-8?B?T240dE4xTXh3VHVGTnJPUmlQYmEyRzZqWkZ4SjRUOXZTcEMrQVZEZ1hBajQ2?= =?utf-8?B?L3hNQURGeThVWkhtQkpDZnM0bGt3TysvMm1hUzBjbTNlZUdneUhlaDZoeS9r?= =?utf-8?B?QytxcHJPRXc2SVNUQklKV0p5b0d4dTRwT3VlQWhpcVR3cEpnYXRDbEVRPT0=?= 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)(1800799015)(366007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VVlUT012SDZ0TVptRWJHRHZtR3doc0RrK01CYlA2RGtveU9NM080dDBlNFg3?= =?utf-8?B?MmxJM25EUlF4UE8zZHBYc1QzamxzdzRuV2hmOGJLNDUwUlh6Um40SkRpVFJl?= =?utf-8?B?RTNnczhsV1JRd2k4QWtJeUZwazJkd2hYNjBiajlveXo4WXBPeVdZTnlBU3lD?= =?utf-8?B?Tk0yaXhvMHpWRHJMV3NHZlFXVWtRMUFEYkRiZEhXSDNaTEtPYTJxcTZYQWNZ?= =?utf-8?B?WE9xS0xMYnp0bUFhK3R4WXNUVUNiOXlrVENrQjExL0xwUnNldmQv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nRadnVydDlkbFNmVXJBcEsvVmY2Y0J6S250bHBkbnBaUThvcHl5?= =?utf-8?Q?nlg6S2Mq8dWshG8B5oxz5TNnJ?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0c64395d-693a-4064-5410-08dc6ebafde5 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2024 17:27:38.5101 (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: O3ur9+wNW5s0OB2O6ny8B0fxap1ZpZSgIkNTxGFKFersDOIZJgHyMmEmqWnuyxzR X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB7475 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/7/2024 3:52 PM, Stephen Hemminger wrote: > On Tue, 7 May 2024 14:48:51 +0100 > Ferruh Yigit wrote: > >> 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. > > The device register worry, can just be handled with a compiler barrier. > Does not need the stronger guarantee of atomic or volatile. > Based on Morten's email, counter being stored late to memory may not be an issue, so may not need even compiler barrier, let me check again.