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 8A40043EF9; Wed, 24 Apr 2024 21:13:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 63DAB40691; Wed, 24 Apr 2024 21:13:35 +0200 (CEST) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mails.dpdk.org (Postfix) with ESMTP id CF7B440689 for ; Wed, 24 Apr 2024 21:13:33 +0200 (CEST) Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-602801ea164so147643a12.0 for ; Wed, 24 Apr 2024 12:13:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1713986013; x=1714590813; 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=Odu5MZD/xpqvHNkgNlfKc2To3qQv76gLukACD0nJ2d8=; b=XxBSotgV8MN3XRdThHdp1TAa+jOh0rywSTL/tU/y+c69vyOhKSQTRYXcj/7ovp4Q7v d31X37b64BeN3q3jIw6eIALUVwv+i0RfvptnGvth9J+ag4vxyF2B3PiGadkgo25jgTY9 bAGVEbDnZXN4ghk7PxSE0sF7twwOPn2R3h3hSF8L42bFvaOjh4CQBe80R85cUMWIrDOy oNmawszylsUcMp7yWzmVcDFmGl4tuj/O+4Znayr6YXdODnplGw4S6xaujfuB1LPuxdRl G+yX0mZq2vzdcGjk/VcN2d9+2XQZrH/4vf8e3pG3eJ/N2OA+ykcAPYOBhAZEFtpeUdvB VMZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713986013; x=1714590813; 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=Odu5MZD/xpqvHNkgNlfKc2To3qQv76gLukACD0nJ2d8=; b=im+0xZfrAJS82d8co4EQNB3q9GNnej1TCMAVDQBo1FO87eFzaQ5BKqP8kwzvBlG4PU xpnR0DVB4k5RsoDVgz7Nqr6h5sT7/8QIpHK/Hw413hb/SN30el4GXVO74kcx//B9HQk7 TraQJJEiaG/ArdoGfdKdeFu8cL8wtAZdmAbhJCJz5mUSH6PC7Yg8JE8/l17Qmgf9Qab8 i3x2sLsNrqp2kkibAMOobXDhkt+pzwdRWIqgQA1mO8PC1g/QGewTqFfDjwceL+irvawH eBfH6Z0fOgaVtHCtm2imy/Vm4Sm/I6GsMo3y+PvKkAVUTpKIA7FeW0T3kgUk4u9v8IsH g2Lg== X-Forwarded-Encrypted: i=1; AJvYcCUS3MToAu1KrwhJk32b9iGRtiphyjBlTYbGvGPkv/ZIzMWmw75IZqTkKhWdaLrlrcdjIiK0Pq/ttv+zYlQ= X-Gm-Message-State: AOJu0YwhmtL2sxNqAZkdktFMX+x88Nvn0LNtWlTjYvhzJo0xB/qx36TJ XjNbNT9AywOFhCKIGQ1nllbO5wbfTi55cheXjRUc2Q3lZHeyUeHTCMIYag0JOaE= X-Google-Smtp-Source: AGHT+IGN9Jj6+VQKmRpqEsTVseMW0j+AEp5c0zgPhVoCrDfdkqsBGjITJG8eWX6VxWhNUI6hVON8Lg== X-Received: by 2002:a05:6a20:dd9d:b0:1a7:507a:c9f4 with SMTP id kw29-20020a056a20dd9d00b001a7507ac9f4mr3473019pzb.30.1713986012900; Wed, 24 Apr 2024 12:13:32 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id m6-20020a62f206000000b006ea80883ce3sm11750026pfh.133.2024.04.24.12.13.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 12:13:32 -0700 (PDT) Date: Wed, 24 Apr 2024 12:13:30 -0700 From: Stephen Hemminger To: Ferruh Yigit Cc: Mattias =?UTF-8?B?UsO2bm5ibG9t?= , 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: <20240424121330.7547e290@hermes.local> In-Reply-To: <0ff40e60-926b-44eb-8af5-2e16aff1c336@amd.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 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 soft drivers af_xdp, af_packet, and tun performance is dominated by the overhead of the kernel system call and copies. Yes, alignment is good but won't be noticeable.