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 F1CE443F08; Thu, 25 Apr 2024 18:21:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 75AB7438DA; Thu, 25 Apr 2024 18:21:50 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2085.outbound.protection.outlook.com [40.107.237.85]) by mails.dpdk.org (Postfix) with ESMTP id 54B74438CF for ; Thu, 25 Apr 2024 18:21:48 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EvMOm0Fr7rDVe+XQJJS+iX9wMTUFghkhjjEmPv/2ungd722yp0clJJ3vjgVlGkdy6dE4Bx5Zu5H1ywi4uLjzt9FTxdSxYxTfdYxl1zwrE4xvKOcbqy6MS35PIdlhwxvGtdtvbq4Au5r/5f7+OY0uziV99UjrJqgsTXW7yMhDL9fW0kFfs1ohO63dkmfjpoyajXi69gh96S/7wrSsNzJi8V1hfN/bv6AtWVgZg8fnt7AG6JZZsxeaFD6napVJm6GeUxyHio/ctoh9s8LX+Em0R+haYV5KlhO/SJ6weGPpXpMziRVdWa57x22Sz0ygOXliuYyGCzbSDLa11YeoSXlHGw== 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=NlwAnsa9Jrhd6f58npSwczy9DiVJb81N8PLQcoE4DiM=; b=Qe8AoP01FFcLSCbp4Vg9gG7JrIio1SO8j93jfBgvPbu//z8PLcbsDvrtjuGy6ky01UpCdGXriPWrCrLM3+8cFF3CLnpxFMyz1273Ec38aeUftYI2liyxwo7iaa7Idv0Le9u82eUc3Z7c8NHr+ow60cpqcmzcixGuE7DoQyFo+fcDqjbnsFizmFk9UIytmldlI7NJhSi5hcG2NS+qQ5UVy1dHs2NIzDPu3k0oEXTrWk1CFBGplAsxtBpr/MKKrDAOgyKH7ML1/Ku+yUp5KTRfFeuTuQGqaMaaAFiuyQ8kmhBFPU/pXNyp2sxLek3kdcsChdvo91cp77IxL3+JA3wPbQ== 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=NlwAnsa9Jrhd6f58npSwczy9DiVJb81N8PLQcoE4DiM=; b=tQrDWCu6Do1EpQe4EKg8PIQ+apumZf/LslPz6GvzekEFMTbNO9PoXbVM3smPvCUyuglXj3f8Q5Bli1mE1dFwHXdYpbcmLCygvdX1uC4v62V7ZRwjejEEJCYMcWM9R7pQcWT7O7iPRwz7QZO9aFA/G7AvNN3vQjPIdxO8k0cwtsk= 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 CH3PR12MB8903.namprd12.prod.outlook.com (2603:10b6:610:17a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.24; Thu, 25 Apr 2024 16:21:46 +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.7472.044; Thu, 25 Apr 2024 16:21:46 +0000 Message-ID: <3791bf00-5dcb-4caf-abbf-f464c39182bd@amd.com> Date: Thu, 25 Apr 2024 17:21:42 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] net/af_packet: cache align Rx/Tx structs To: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , Stephen Hemminger Cc: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , "John W . Linville" , dev@dpdk.org, Tyler Retzlaff , Honnappa Nagarahalli , =?UTF-8?Q?Morten_Br=C3=B8rup?= References: <20240423090813.94110-1-mattias.ronnblom@ericsson.com> <6f7aabcb-2c12-4cfe-ae9d-73b42bfd4977@amd.com> <63dbb564-61f6-4d9f-9c13-4a21f5e97dc9@lysator.liu.se> <5d2a0887-527a-4948-943c-65f1dfda9328@amd.com> <3b2cf48e-2293-4226-b6cd-5f4dd3969f99@lysator.liu.se> <0ff40e60-926b-44eb-8af5-2e16aff1c336@amd.com> <20240424121330.7547e290@hermes.local> <2371b1a8-bdc5-4184-8491-54e2e3a64211@lysator.liu.se> <20240424165534.2ad8ae0a@hermes.local> <4c0f1625-4387-4870-a60a-dc423885811e@lysator.liu.se> <2d07603e-e024-45a4-bfb1-c350b08ccdfb@amd.com> <37e85e59-585b-4503-81c2-2f8fc0a6746f@lysator.liu.se> 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/A7UXBKLa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osIrWS98QJmscEhP8ooyJkLDCCOgEk+mJ/JBjzcJGuYn6+Iy/ApMw/vqiLGL1UWekcTA g18mREHqIR+A3ZvypIufSFB52oIs1zD/uh/MgmL62bY/Cw6M2SxiVxLRsav9TNkF6ZaNQCgn GqifliCEMvEuLZRBOZSYH2A/PfwjYW0Ss0Gyfywmb2IA990gcQsXxuCLG7pAbWaeYazoYYEQ NYmWatZNMAs68ERI2zvrVxdJ/fBWAllIEd0uQ4P05GtAHPdTIDQYp545+TPV7oyF0LfXcsQs SFVZE6igdvkjfYmh+QOrHGZvpWXLTmffVf/AQ81wspzbfxJ7sYM4P8Mg5kKOsaoUdyA/2qVe cMh1CLUHXF1GlofpGbe1lj4KUJVse5g3qwV7i9VrseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <37e85e59-585b-4503-81c2-2f8fc0a6746f@lysator.liu.se> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DB9PR05CA0024.eurprd05.prod.outlook.com (2603:10a6:10:1da::29) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CH3PR12MB8903:EE_ X-MS-Office365-Filtering-Correlation-Id: 06f7e9fc-0a63-4bf4-13f9-08dc6543cd54 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?MHBzK3NnNXNNQ1JJUE53NE5VMWw3ejFLbU1ZOW02ZWs3a2JwSnMxZllVZzBD?= =?utf-8?B?QlNZWjRJVFkyRURNQ3B0Q2tkS2xGeWhYdWM3MFhjOUU3N3pyK1hl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lOcWg5amMzd0hXejFDTFl3?= =?utf-8?B?SWJQYXRUSFdOWXRoUms5dllhcUttRVhSMUdudStXaXdSTTZReVdnOVU4Q2ZO?= =?utf-8?B?MVdBYm5wem5ZMGxSZVRqTW01YVhoVHc3dXpZSzRHWlFhL1A4bjh1SWdQOUht?= =?utf-8?B?ZUJGMExCODZpeDVCaFJTS01XblMzMVhoN2hCa3J5Q1Nyb1hFQm80eWFYemdv?= =?utf-8?B?SjVYZDFqVG5QcSszcEprRlBuTzl2MzB3WHYrWE9KZWtPOE44UEpIS01uejlP?= =?utf-8?B?Ym5FU0cyOGp5WFlWZ1I1b3dlb2htQUcrbmRGbWlXOFNYbHFGam9pUnZPSGs0?= =?utf-8?B?bzJ4OW5TUU9UYi9yUTNYcjRsclJZUDMvaVdQeVFUWU5hSStrK1VuWDdQaGE1?= =?utf-8?B?dGV6TUszWTZZeHkrdVoyL25VY1dQcTJWbEJuTU1FL3NranlyRVhtOEZpcVRQ?= =?utf-8?B?dGRCaEdwbnFFOENvMExWcWpKY0R6cmRTbFNsV2dhZllUb2ZjTkFmeW5CQkIv?= =?utf-8?B?cEowd2lmdEhRQTAwVjRUd2NvbWV1bjFjdGw0MnViNzZwT2s0emNSVHFCaVZE?= =?utf-8?B?WjBqUy8wWFhhVDVZK2I5SkdnTVNPSys2T0tXc2M3RVlqZ09VZmFjM3BSY2xo?= =?utf-8?B?VTY3eGVTQlVBNnFldGxDcXhwMUJYRFdWUmlZUm1OR3U0am92aGJrUjlIbUNt?= =?utf-8?B?TWhjRzEvRW1hL0NuaXUweFJ6YTlHTW04am52YkVoR2NlbVplbFZsek93PT0=?= 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-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YY3lZMjNXaXk1eTBRQ0lFSWswOWMxQ3Y1d2hlRUlI?= =?utf-8?B?SDJEWFZnOStyUHBGb1dTTEY3K0dWMUt2MkU4YmJ6NlRRWFBGakc2RXZEMVc5?= =?utf-8?B?RndGUXBoSzNlTUMwR042TnA2NEpUTzZVUTJVNXVpZ3kwdkZha3Q1YnlkNVdS?= =?utf-8?B?K0dEaDRkUUtjbnhVMWNBWFZDZHE2aFNhS0VvWTVSU3VPdFMyekVzMm9ZOHhi?= =?utf-8?B?U3p1Y3ZrVFRWekhaZExMdXlJWEpIQTNHMFZpeUtrbTBqc2pXaWJRUy9XNFls?= =?utf-8?B?S1NWRmU3K0VGbVViczBPblpPelY4enE5MWIzVWJHYkJNTGtXMVpSUmtjRisx?= =?utf-8?Q?w496EdbiZiby+f/Aph77vm19O?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06f7e9fc-0a63-4bf4-13f9-08dc6543cd54 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2024 16:21:46.4098 (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: hddIoVIUYJpTCAhG6KFD083CjJsLB5Jc2SsuApGbAPEbw+qswueCH4Hm5A1v7byq X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8903 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/25/2024 4:06 PM, Mattias Rönnblom wrote: > On 2024-04-25 16:04, Ferruh Yigit wrote: >> On 4/25/2024 10:26 AM, Mattias Rönnblom wrote: >>> On 2024-04-25 01:55, Stephen Hemminger wrote: >>>> On Thu, 25 Apr 2024 00:27:36 +0200 >>>> Mattias Rönnblom wrote: >>>> >>>>> On 2024-04-24 21:13, Stephen Hemminger wrote: >>>>>> On Wed, 24 Apr 2024 18:50:50 +0100 >>>>>> Ferruh Yigit wrote: >>>>>>    >>>>>>>> I don't know how slow af_packet is, but if you care about >>>>>>>> performance, >>>>>>>> you don't want to use atomic add for statistics. >>>>>>>>        >>>>>>> >>>>>>> There are a few soft drivers already using atomics adds for >>>>>>> updating stats. >>>>>>> If we document expectations from 'rte_eth_stats_reset()', we can >>>>>>> update >>>>>>> those usages. >>>>>> >>>>>> Using atomic add is lots of extra overhead. The statistics are not >>>>>> guaranteed >>>>>> to be perfect.  If nothing else, the bytes and packets can be skewed. >>>>>>     >>>>> >>>>> The sad thing here is that in case the counters are reset within the >>>>> load-modify-store cycle of the lcore counter update, the reset may end >>>>> up being a nop. So, it's not like you missed a packet or two, or >>>>> suffer >>>>> some transient inconsistency, but you completed and permanently >>>>> ignored >>>>> the reset request. >>>> >>>> That is one of the many reasons the Linux kernel intentionally did not >>>> implement a reset statistics operation. >>> >>> DPDK should deprecate statistics reset, it seems to me. >>> >>> The current API is broken anyway, if you care about correctness. A reset >>> function must return the current state of the counters, at the point >>> them being reset. Otherwise, a higher layer may miss counter updates. >>> >>> The af_packet PMD should return -ENOTSUP on reset (which is allowed by >>> the API). >>> >>> Maintaining an offset-since-last-reset for counters is a control plane >>> thing, and shouldn't be in PMDs. (If MT-safe reset for SW-managed >>> counters are to be expected from the PMDs, we should have some helper >>> API to facilitate its efficient & correct-enough implementation.) >>> >> >> statistics reset works for HW devices, instead of removing statics reset >> I am for documenting API that it may be not reliable, I can send a patch >> for it. >> > > With API you mean ? > > If rte_ethdev_stats_reset() sometimes reset the counters, and sometimes > doesn't, it should also have a name that reflect those semantics. > rte_ethdev_stats_reset_or_perhaps_not() > rte_ethdev_stats_usually_reset() > :) point taken > Rather than expecting the application to deal with unspecified > non-determinism is seems better to specify under which conditions the > reset is reliable (i.e., it's not MT safe). A non-MT-safe reset will > limit it usefulness though. Also, it will make having an MT safe reset > in a PMD pretty useless, except if the app is programmed not toward the > API, but toward some particular PMD. > >> With above change, we can be more relax on stats update specially for >> soft drivers, and can convert atomic_add stats updates to "atomic load + >> add + atomic store". >> >> Does this plan make sense? > > Not really. > > Short-term the -ENOTSUP seems like the best option. Second best option > is to implement a proper MT safe reset. > > What is unfortunate is that the API is silent on MT safety. I've > *assumed* that many users will have assumed it MT safe, but there's > nothing in the documentation to support that. Rather the opposite, the > generic section of DPDK MT safety only mentions PMD RX and TX functions. > > This issue is not limited to this PMD or even to ethdev. > rte_event_dev_xstats_reset() and some of the event devs have the same > problem. > True, and we can document multi thread safety of APIs at least, this is small effort. For reliable stats reset, implementing offset logic is not that hard, and enables having more optimized stats update in datapath. We can go with this option instead of unreliable stats reset. I can add this at least for af_packet as sample. As far as I can see, with this update we can get rid of volatile qualifier and atomic set for stats variables.