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 18D1A43FCC; Tue, 7 May 2024 19:40:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C353402DF; Tue, 7 May 2024 19:40:19 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2065.outbound.protection.outlook.com [40.107.102.65]) by mails.dpdk.org (Postfix) with ESMTP id 41560402A9 for ; Tue, 7 May 2024 19:40:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E6iT2NcJbECjLaci9pN3wiONfOFXU6MX6Le4KAYYMUEXouqCFRXECeRGFH8zJnSQ+aAVxIgDcG25CZo7fBqJ8nW27TK0IikkveeGgg+TIXb51S8t3gYCLKdz2VjdlcwFUUDWcAQ/PrQgqGQEBBp5huP8ej91Ui8kmbhWlJvJu9PQQXRsKEiX05SjZvzYbDDn+kAqPQxBp2ps95Xqw8f53rLl4WERLREL0QCnGOqKA/1Q9Crjiy71hwpaS9elLO/L216tgXKld4ujSwCIdDvF+0xXpxmgdVizrC+D15QYq/gxhUjc3Ldh+x9rNFGNwMVH9MsCp+FyZlHiEBGRTTcQjA== 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=YiEPlIDWxMWXTGt7xZSADy5OnwtZuJjFQwF8a6V0Tqs=; b=HACvN35qiGA635hwy+5x4emYPikRdYHkwy80zt40Dad2OdV+cYqdlhjBb/FIp2a5aR49baQvBK0AGb7ckcu44pqUBjptg90nN8vjB4i1M0y3ZthJ8YKt/evicGTNmmgHx4cO9b6GoeJJBWhC0r+mxxvOdDml4NXbP7a7nJEn39QAlvEXTrSTh+qDoetykr8VhDXf3Z5Xmxn+NwtJXulHT3b/Wc3lk+CIZxaA+Z20f+wXLMxugxx56Hif4yblv3oPTgLSP4Kp4rivUkAyaKVGxiFLaoafVlCPwzuKKTpbozs0PcnpvLqJEAf5Lr+aDvtFy3c9GKYkmTxGho+SwoLqgQ== 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=YiEPlIDWxMWXTGt7xZSADy5OnwtZuJjFQwF8a6V0Tqs=; b=ZOhcA8E3fkGf+6dVur1DFXyDy2POI/DAmFXwCj3jx0bZCLqkKXdVS90jMjhd0sfcO1dBFMVhqbF4kxU3wwc3GLMcVzXKPO/5fxWXGnRhoznk0xPeL+CYB7mnIj1EI8rNA1vCroAa4aCr0dKd8aUp1KJFA9+706m8IyaMXxJtqA0= 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 PH0PR12MB7930.namprd12.prod.outlook.com (2603:10b6:510:283::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.39; Tue, 7 May 2024 17:40:14 +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:40:14 +0000 Message-ID: <1b02095f-73a0-4001-b9ff-f815f7b1c933@amd.com> Date: Tue, 7 May 2024 18:40:09 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [RFC v3] 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> <20240503154547.392069-1-ferruh.yigit@amd.com> <98CBD80474FA8B44BF855DF32C47DC35E9F422@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 aXQgPGZlcnJ1aC55aWdpdEBhbWQuY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Gbe1lj4KUJVse5g3qwV7i9VrseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F422@smartserver.smartshare.dk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0645.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:296::16) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|PH0PR12MB7930:EE_ X-MS-Office365-Filtering-Correlation-Id: b5f70a5e-d55a-4887-127f-08dc6ebcc039 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?R25Cd09yc1Rjc0pWYWEwbkE4LzBGSDVjM0RSbmg5d3FGV2hNR2c1dmVCN2U4?= =?utf-8?B?WFNtZ202aEVMdmJPMnV4S1hORFlJMjVoRWYwc3V4eXpkSTFhdVNJRlFMT01n?= =?utf-8?B?VnMwQytmcU5kY0VJek5TZzBjQUF2elVXQXY1VmRMUkJ4ZDVWejVOeXEwb2cr?= =?utf-8?B?cEZnS1lPMitNcm9rWjNrSTBkcTFWM1NVc0Y2VnlYMnZGcklkcTdESDcwb1Ey?= =?utf-8?B?UEcrZHBvb0d2MmFTMVMxcmZoMXRwWWpITTMvdkFZYmJNTkxYOUlEMWE1YURp?= =?utf-8?B?WEZLUnQra00wZTI5UDduL1RIRDdtczN5cit4dXo4ekFBV3dUcDloYVNhWUx5?= =?utf-8?B?V1luOGx4VmIrcElPdHBLZmc4c2dPUUpqQ0NGcjkyekQ0czdNTVM1bWFrRDBo?= =?utf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lNuWmUrOTJ6?= =?utf-8?B?S3c5bWxIWHJ3UllkTTF2djZjT0xoRWtQMkUwdFdxdEw3YUpKUDYra1VOVWVk?= =?utf-8?B?aXpxbjJlS2drVlhqS0NmQ2RObzZVWUlJclNaMGQ2WFpqZGtjZHNEMFVUOEpn?= =?utf-8?B?cUJPaU80QXdtN1puYXR2S2U5UFkxT0hLU20vT1A3Nm1lYmM2a3dLQkJudXU1?= =?utf-8?B?b1FqNE1KbDluS3g4TiswNHI3UEE1SFN3eDJEQ3E4R1pmMjkvbVdVSnJFUjJW?= =?utf-8?B?ZXVhWmNBS2dxeGRSaVVBQ3V1WHVCVlJ5cTk4TmFiZWhyOS9kSEE0UDE2K0JZ?= =?utf-8?Q?l7OPgtd9ddpN2/ZjE30fg6MECqtVhGBW6z2ngiK5/dAU=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)(1800799015)(366007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Z2w2M2ZKcFNQSTBNdHIzbjVwWENHRjNmNG0xVTZCNFBBa0dlMVdsbmg4K1NY?= =?utf-8?B?V09oYjZjSFEwVS83WEJGek9lZDByREZnNHBpa21QU1FLdXp5RmJGL2ZNeXJm?= =?utf-8?B?M0dVMUppRXViajZ0NUdjVWNJaEtzVGI2b0VkVzZqZzJQYWJmTUtMMnhPK0NY?= =?utf-8?B?WmVyYW9FamIrSytyeTJMM01UbnpWMHFNUXhtRjdNbHNXeUdOY2MrSkdkSnRG?= =?utf-8?B?NzNmd2w0Yk91d05wdW1IeFVTenhMRFFtWDMzUGRYaFYwK0FaR2gzSG9nS0lp?= =?utf-8?B?aGZ1eDhYOGtlTVFUa3FlMkZMYUU4aDJJVkZvajF3a2UwVz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eDu?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: b5f70a5e-d55a-4887-127f-08dc6ebcc039 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:40:13.9475 (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: EK9Egp/qDCMQYHfJj3FJtrQHAVh8e1Ilgkq1iLLtxLewj3FnZ16ovQ6gLUQHc83s X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7930 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 4:27 PM, Morten Brørup wrote: >> From: Ferruh Yigit [mailto:ferruh.yigit@amd.com] >> Sent: Friday, 3 May 2024 17.46 >> >> 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/ >> >> v2: >> * Remove wrapping check for stats >> >> v3: >> * counter and offset put into same struct per stats >> * Use atomic load / store for stats values >> --- > > Note: My comments below relate to software PMDs only. > > Design for the following invariants: > 1. "counter" may increase at any time. (So stopping forwarding is not required.) > Mattias mentioned a case [1] that may end up 'offset > count', for being safe side we may start with restriction. [1] https://inbox.dpdk.org/dev/20240425174617.2126159-1-ferruh.yigit@amd.com/T/#m29cd179228c164181d2bb7dea716dee6e91ab169 > 2. "counter" may not decrease. > 3. "offset" is always <= "counter". > > So: > > Stats_get() must read "offset" before "counter"; if "counter" races to increase in the mean time, it doesn't hurt. Stats_get() is a relatively "cold" function, so barriers etc. are acceptable. > > Assuming that stats_add() lazy-writes "counter"; if stats_get() reads an old value, its result will be slightly off, but not negative. > > Similarly for stats_reset(), which obviously reads "counter" before writing "offset"; if "counter" races to increase in the mean time, the too low "offset" will not cause negative stats from stats_get(). > ack on above items. > > And a requested change for performance: > >> +struct stats { >> + uint64_t counter; >> + uint64_t offset; >> +}; > > The "offset" is cold. > Stats_add(), which is the only hot function, only touches "counter". > > Instead of having a struct with {counter, offset}, I strongly prefer having them separate. > E.g. as a struct defining the set of statistics (e.g. pkts, bytes, errors), instantiated once for the counters (in a hot zone of the device data structure) and once for the offsets (in a cold zone of the device data structure). > There could be variants of this "set of statistics" struct, e.g. one for RX and a different one for TX. (Each variant would be instantiated twice, once for counters, and once for offsets.) > Although having them together was logical, good point from performance perspective, let me work on it.