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 1E26E43F69; Thu, 2 May 2024 16:12:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A4C29402B2; Thu, 2 May 2024 16:12:50 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2070.outbound.protection.outlook.com [40.107.94.70]) by mails.dpdk.org (Postfix) with ESMTP id 4CB8940299 for ; Thu, 2 May 2024 16:12:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HbWzZYADJ5w8V7SQfuh9hNyFxt7qhFYQKXxG5u99KRkZWe/pLdeEZnS2hCStUvQACXOA1woeGkFfYl/0eIf/jtUDqUzH31eK6wtc458XlWFlAKw4YBHPGh5BfnDW4XAq9ZTsbITv3gpDkoaCBbPD0MO0Fj6Z2rCgpl18iZsxvUbsfuOZUhZujLpBslTHzTGDr6OPFAdE3sAVyph5WJP54ZfHk9sLixpN01hO9SoI9mH9OnskO3Tkr7U5KiULcqgnj+Vu5NnHPCCozi6Sqt+cWlzrVtsLcD+B/DwklNkYbk9qh7HexdK3Kk/ZLBtxfgZuvr6UdSB4Woxt0MdEkPmVbg== 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=p70Rsy2f4sRBVDxDpq9V1l6lZyASRTozf8ey791gx1Y=; b=hXEvbnJpYkLd3l9tFyt6VCqZ/ElDJMWJqo+70ihgWi492ivf3NB1COJMUkRDaXmpzgaU02jK3R0ttXTvefsz59UpiSHQ7GoIv1+GMx71D983NKvoHAm5iAnr8vuNYuQBWzAsVbXuXoz7lG9x3vxIGaGYvXinOyPjSpvRDMrIEhoORpLbF8zLB3TJCF10m2j+XjXOL3Hn7r34BCjgQMsc9Cb21yRca2bHuWekUOlU3YJXMYpFFt3Atu0TGslvTN6tYBYTZZAZdd+Q8nv0x/l5tEDSFObWoVv5Btl9in8PSxQp6R3gV4OGz7HauHFNcPi/wqvTQFVNGYKhpyYjmLRSUw== 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=p70Rsy2f4sRBVDxDpq9V1l6lZyASRTozf8ey791gx1Y=; b=f24h/ogKzEV5K9gbXDZgq7WCDdxwwYtVAFenlPIkRsJJ5fq4WpKM0zSgZe/IoeZKp0qOM80RTqovvrNrQtYy86Gj51Qd8a+2B1mM5fhvuEd+br7rZbPYAA6oumSqbYM6ZCdqH0sv+Cx6RDSi+RbCuJ1K+r1SyaD3e0W6O0MqVy8= 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 SA0PR12MB4432.namprd12.prod.outlook.com (2603:10b6:806:98::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.28; Thu, 2 May 2024 14:12:47 +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.029; Thu, 2 May 2024 14:12:47 +0000 Message-ID: Date: Thu, 2 May 2024 15:12:43 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] net/af_packet: fix statistics To: Stephen Hemminger Cc: dev@dpdk.org, "John W. Linville" , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , =?UTF-8?Q?Morten_Br=C3=B8rup?= References: <20240430154129.7347-1-stephen@networkplumber.org> <9025199c-585c-4779-9f4e-360845707088@amd.com> <20240501094303.751e95b4@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 aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5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CXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20240501094303.751e95b4@hermes.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0497.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:13a::22) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SA0PR12MB4432:EE_ X-MS-Office365-Filtering-Correlation-Id: 845fddae-a6b9-40a1-9add-08dc6ab1f142 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?Y3E4bHVaclBvMThWT3NQL2xWVjBFT0hmS2RvSTRBZFNEbFptNDNGaGt1Wkxt?= =?utf-8?B?ZytqUWVWRW95MHZIcVNWWXhuSEVEOUZjK2t6T1VpQVRSSXpDVjFEVmJTZ2tG?= =?utf-8?B?djY1WWpUNTVRL3ZXWHIrOFRWd1U0UW1KU1NMV1FOaU84KzQvUjZaY2pxWFNV?= =?utf-8?B?endDOUlaRHczdEd2Wmt1dEhvMEl0WFo2elZIeG1rdGI4RFNaeVFhVVVwZ3R6?= =?utf-8?B?RTV6bW8vLzNGbVFpNzdmUDFTZWVaalFKVmYwTHQ2N3VKYU9lbGxmVnpVbE9y?= =?utf-8?B?WHN6ODFoQ0dwQS91UzRrTzJCWHpBakJzUE0wZGh0ZGRtWkpFM1NOaXlPeHl5?= =?utf-8?B?NDQ4Vk41dDBLRW9qK2FJWGNTWHlaT0M0aVlMNEhCT1YzQXV1NG5ncEQ3Z0xn?= =?utf-8?B?emQ0TVdHa1ZvM3Mzd0xhL1p4bUpuZVNNTnBCTzltU3daVGpvb1I5NXhiTWZl?= =?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5L21SV3ZWZjZ2VkpOalRE?= =?utf-8?B?aUFKUU9oYmx6Rk9YVXhoT1h1SC9BTTNCSnF6c3JzK0tmM0JFLy90NS8zcEVh?= =?utf-8?B?QXhPVUVmN2pwVkJtRFZpTGx2V01oRTdVcG5TaEkwdXBEak84dmpjMXJFekcv?= =?utf-8?B?QVhxYmNvVUZjU0Z2d2lkcStFTGJFdmpGS1BlQm0vZ01DTFdNcHlYRW1TYXd1?= =?utf-8?B?VVpSTTY4Um5ObWRtZkVreUxuOW5BSlRucllpNllsVzFCYlNwdmVIQXUyamhH?= =?utf-8?B?Q04vcW1VcDEvRnMwenNQcHdhaCtucHYrUHZmUDRRdHFKbGcvb1orSjRCcWVr?= =?utf-8?B?cjdmRldsTU9QRHpJTlJxZ1FwajQ1dEZndUFIckdxbHdSRCtCVVBTS1VRPT0=?= 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?eTEwcks2bjhNM2tDNndtQ0ZVbVhhOWY3VzF0KzAyS3prQ2RnYlZaZ1RaRSsv?= =?utf-8?B?ZU5sTzQxZkVZdEdxVGt3Ym9XbEFGSlRLWk0wckwxN3FVbkFsZFhTOHpodmZU?= =?utf-8?B?OVlWMjFCMFJYMWlSOFc5UXR3bmlmL1JkbEduMkp3K29PUGN2eFlTOXVhWHBh?= =?utf-8?B?QmhSbFBGV0hoNjZrUjVqc004VmZKZkhqSVJHbkgvQWFDVkNSR0hFaTNRdlBr?= =?utf-8?B?Wmg0Mk9RSjlvaktwN0tHQkxqdTlFYmFzTzVReEZzM2FiMzk4ZmhXL3ZyWVFO?= =?utf-8?B?a3ZZSXY1LzFvWlJ6VUxpSEF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HJPcW5I?= =?utf-8?Q?WDAXGObkQmxUvtJ4fOLl0PcRP?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 845fddae-a6b9-40a1-9add-08dc6ab1f142 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2024 14:12:47.1218 (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: mYa58SRb3YpCnHpaG6QmejE8bmzOUF7S6JhQcoagmZMf5cqn7uI0sloZ5a4QO/O+ X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4432 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/1/2024 5:43 PM, Stephen Hemminger wrote: > On Wed, 1 May 2024 17:25:59 +0100 > Ferruh Yigit wrote: > >>> - Do not mark statistics as volatile. >>> Instead, READ_ONCE() where necessary. >>> >> >> I did similar [1], and Mattias has some comments on it. >> Issue is not in the reader (stats_get) side. Without volatile writer >> (datapath thread) may end up *not* storing updated stats to memory. >> >> For reader side, I expect value not been in the register when function >> called, so it ends up reading from memory, which doesn't require >> volatile casting. > > These are per-queue stats, and anybody foolish enough to have multiple > threads sharing same queue without locking is playing with fire. > It is documented that DPDK PMD's don't support that. > I am not referring multiple core sharing a queue, this is wrong for DPDK. For single core case, if a variable doesn't have 'volatile' qualifier and load/stores are not atomic, as compiler is not aware that there may be other threads will access this value, what prevents compiler to hold stats value in a register and store it memory at later stage, let say at the end of the application forwarding loop? For this case keeping 'volatile' qualifier works. But Mattias has a suggestion to use "normal load + normal add + atomic store" in datapath. For getting stats, which will be in different thread, you are already casting it to 'volatile' to enforce compiler read from memory each time. Additionally when we take stats reset into account, which can happen in different thread, 'volatile' is not enough. For reliable stats reset, either we need to use full atomics, or offset logic which I am trying to in other patch.