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 CA26C43EFD; Thu, 25 Apr 2024 01:55:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5FF32402BB; Thu, 25 Apr 2024 01:55:40 +0200 (CEST) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mails.dpdk.org (Postfix) with ESMTP id D137C4028A for ; Thu, 25 Apr 2024 01:55:37 +0200 (CEST) Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1e4f341330fso3968725ad.0 for ; Wed, 24 Apr 2024 16:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1714002937; x=1714607737; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=1aTi/tMSAiF0CYPkqMAR76HhMz2L7cnYWjFW2pol3Ho=; b=2KYbtlsPBFkVT2FxQyZxE9W5/Zwl6rMYD1ymT86GfePLM5UotUh2OVRapFG5jEYX9y 7SthXZb19nE8jnjYDGxdiGmc2H4mtVo6oOBE66f8MxTklYvVfPRKK0EOhc0YqPlTZ9ct 6GWDuPZGKuRVTS7s3/443CDtkAP56bw0hDWiDhEVrFLr556ZAtl98CT7Z8D7ZLBS64Mr 5ab5SXlDG7gb3XqcI4RDmwo5d73hyG0WL/g9iGVctW6KWaWksha21gSXlaEoiSrzStAZ SVHhpGySJ2w525kh2b5BXthx9CFzqR3VJ88Zv+jFDRZlEC/xsZtz//zWUg0AIFjGL5GM K5sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714002937; x=1714607737; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1aTi/tMSAiF0CYPkqMAR76HhMz2L7cnYWjFW2pol3Ho=; b=meWr4mGpdNsHrRo362FoXqq6mZpEnyI9cFt+0hx2HQXkXMx+h0tTEDtBMC8QivS0mM BD5+mZt0Pi3ZCQVmKOz5I1YkF7lTcM+SzQkT2ojKs309RkEaRi/I98Uiw+la1dkrue8N rQJ8oEgIS5TGOPE9/h3JHVbST5w25K2oTGpjHP47f0lwRWKOzljhLfJx+0bFJW1YdhCy GO/VDnD441aic+Uy5p9JzT/XeShPSRHC48GQzCVqzb46NjVGlrLEohqrFy795JT75ems d57bw2Vby5VsSfBT4CnxTEZLVJ8Qw1Kg3Q/P9xEJJcmdvDwaBB07npTbUwV1C3nzaodQ vMpg== X-Forwarded-Encrypted: i=1; AJvYcCV/63zuiN6p6N7cu/iHa8R7I1CJllABSv9p0QHHvS9hZVX4y1aQTKulVj4yVr9BtVGugQXOZx0yHvylfww= X-Gm-Message-State: AOJu0YybzIZ51Bqerj/VXOQq6TP9vvlmR71HT9Ah7vnz7cTBVe0BS44o Fxml9V2tVC+oYW+Fjrj1RC+2nPMa8spyAy99BQBPi5kuLk0HLzZK+4WdfBZocms= X-Google-Smtp-Source: AGHT+IHUkGhkOFjYNvZiq/3QbLxSqYDPWHJsEvaRnsccBDMEE1e7cM2Og/Dccg5gyub8xcEKs7OYZw== X-Received: by 2002:a17:90a:ab18:b0:29c:582d:bade with SMTP id m24-20020a17090aab1800b0029c582dbademr3862228pjq.2.1714002936899; Wed, 24 Apr 2024 16:55:36 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id o10-20020a17090a420a00b002ad059491f6sm8109419pjg.5.2024.04.24.16.55.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 16:55:36 -0700 (PDT) Date: Wed, 24 Apr 2024 16:55:34 -0700 From: Stephen Hemminger To: Mattias =?UTF-8?B?UsO2bm5ibG9t?= Cc: Ferruh Yigit , Mattias =?UTF-8?B?UsO2bm5ibG9t?= , "John W . Linville" , dev@dpdk.org, Tyler Retzlaff , Honnappa Nagarahalli Subject: Re: [PATCH] net/af_packet: cache align Rx/Tx structs Message-ID: <20240424165534.2ad8ae0a@hermes.local> In-Reply-To: <2371b1a8-bdc5-4184-8491-54e2e3a64211@lysator.liu.se> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 Thu, 25 Apr 2024 00:27:36 +0200 Mattias R=C3=B6nnblom wrote: > On 2024-04-24 21:13, Stephen Hemminger wrote: > > On Wed, 24 Apr 2024 18:50:50 +0100 > > Ferruh Yigit wrote: > > =20 > >>> 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. > >>> =20 > >> > >> There are a few soft drivers already using atomics adds for updating s= tats. > >> If we document expectations from 'rte_eth_stats_reset()', we can update > >> those usages. =20 > >=20 > > Using atomic add is lots of extra overhead. The statistics are not guar= anteed > > to be perfect. If nothing else, the bytes and packets can be skewed. > > =20 >=20 > The sad thing here is that in case the counters are reset within the=20 > load-modify-store cycle of the lcore counter update, the reset may end=20 > up being a nop. So, it's not like you missed a packet or two, or suffer=20 > some transient inconsistency, but you completed and permanently ignored=20 > the reset request. That is one of the many reasons the Linux kernel intentionally did not implement a reset statistics operation.