Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp815569lqc; Fri, 8 Mar 2024 12:28:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWaVW/kPM7sf71aSVrchTjFug+xr3Dn/P0NOt68y46dTHKxd4q9dtuuL9iBq/UctIC84taqDo4dbP9NXdqYCnvpyao16ZEdQiz4VzMCxg== X-Google-Smtp-Source: AGHT+IHgFMW5ofwK5pdKEnpyP3fpeoSwyS53SJuzIjdImrYnZ9e3Ll16E+eLJ2USJdO/oPo33lZJ X-Received: by 2002:a05:6808:b07:b0:3c2:2d0e:84b9 with SMTP id s7-20020a0568080b0700b003c22d0e84b9mr236773oij.54.1709929683847; Fri, 08 Mar 2024 12:28:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709929683; cv=pass; d=google.com; s=arc-20160816; b=Z7Sf0ejWoceHAlGuPSk8BD7lkk/X3mwO3mebcrhHZxhMfdoin31p+3DwQs4Af5TVrt A4oBkN5K3LnFYeG5oDGoleWTSC+6Ub2eNV91ua2fmCjMZzOQyKUVtm6hWQH6TxRJGTj4 KGGMRdaqeDl6RsN0pwuAwLj1rntxY15RkzR1CGpHASDaW0holyiwlRHlPNy1UV3eD2js ln5GKLJY3+df+KzDs3Rq69sSypZTmzdJJOJNgk+Ij04Lryurg7a0PFRcVCoH8tzCdkdI bbagQQXwdTB5RLEsUKX4Isu6Nf0rVlqHb7GnEQvlSQ63K9wD4ZPGELnXju1xThWtvRaq FMaA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=X4YljSualvphE619dn8ohVEXXCtDlpB1kwwOLVfoCqs=; fh=0v2cW+AJJL86W9Mgm8a0FgEqLxl3MFIOD40HpkYwT3k=; b=GYaRgNWfkxA4CD3O2to75Q7zD/SflPa4KCksfEp7wTJPUDwa+Hr2TvfR7x9fOG7qvF F6U22/r5zFBhpjP1cD1ledR4Lh8SQcAhNhD9fd7PRajO/CCXGRaTFoOeiI6bdHOUPvpA yWEHf8Mdt8Q0RkrIEIs0zfOdeD+RjjaQlVjbp0Zk7aNandXwj15SicN/SsXo+GopCs/y MKZ1FWM4OKofJKc3yRSSBPfkW999ZER656B1/X5E8c2JQB6m2OoAMRU+Ez+dQKy8Dk9R mC/4Dvhi1o2tNPG2+etXZn+6kgrsBhsn2fiqAh+S7lz6aDYqD8cL5wJo2RAd9Qj75iaK rX4g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AoOteGE2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-97550-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97550-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y18-20020a05622a165200b0042ef84f1eccsi267063qtj.259.2024.03.08.12.28.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 12:28:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97550-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AoOteGE2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-97550-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97550-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8DBC31C2147C for ; Fri, 8 Mar 2024 20:28:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3DD345D749; Fri, 8 Mar 2024 20:27:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AoOteGE2" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58FC7524A2; Fri, 8 Mar 2024 20:27:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709929670; cv=none; b=BLnk936tUB/XA6UrprqKIMgn8gndBuwzV4m82FtQGJlcafeEGRHlaax3W1ZsBinOCiimP4HaAds4shsmvVB5qL4Aa7QoQFZF78fMuN/yn7DpDrjjSIJdx1T2Fcf7KlnhwacHLDlKGfY+JIEjdSNyEWjEQx/JCeZiFjX0LglLTP8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709929670; c=relaxed/simple; bh=3NTsnRHMBLe0tb+2l4cedCjA/tS1VlSVd90rkwF9yXk=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GOYR2N2oiexgy0IbTpEb4wuzdQEH1HcKS42sP7VCy2gY8Abmn4FJ7m5Tv/4+zB+RmG2Ua5TJxDdgmGukLG7Xyq9Kx2G2FFqi6aQ8eJj4wptam5yVJ1G7hDtcgjQyIlCp/XGOZLlYd914IyKyi3TKg6lrSeWmqhOayqOf6I7d0KI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AoOteGE2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F73EC433C7; Fri, 8 Mar 2024 20:27:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709929669; bh=3NTsnRHMBLe0tb+2l4cedCjA/tS1VlSVd90rkwF9yXk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=AoOteGE2ZlnNfsRJ82oxMqGKp/TdZlsemCQIptPjNqmX4h2kWKjkwwHOeuz0eOyZq sm3qgWgYlem+xE6q3rJltAhD/se6FDrHvqmk3x8b5A6OByXkYzaNqWWfLgUdN0B52/ X06nMiph4NSLCzrfdAa2Wy6mFajR89JNmvUdGL68/24x+DlpXEMaE70HwK4A5TG/nv 7fGfdMCPTI2QP2MyX+RFnDlB3265VnsSd150bJ0KlxiFjXc+cK6C6pVSpdwobWBjOw yEWD5Mu7uBypXWs6wA59GcGGWsEOmjF1SrQwnJFl/YDFaOnsUKd6M+FCPIsfTdAu9U 753L9VuXKP8RQ== Date: Fri, 8 Mar 2024 12:27:48 -0800 From: Jakub Kicinski To: Haiyang Zhang Cc: Shradha Gupta , Shradha Gupta , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "netdev@vger.kernel.org" , Eric Dumazet , Paolo Abeni , Ajay Sharma , Leon Romanovsky , Thomas Gleixner , Sebastian Andrzej Siewior , KY Srinivasan , Wei Liu , Dexuan Cui , Long Li , Paul Rosswurm , Alireza Dabagh , Sharath George John Subject: Re: [PATCH] net :mana : Add per-cpu stats for MANA device Message-ID: <20240308122748.47c7dda5@kernel.org> In-Reply-To: References: <1709823132-22411-1-git-send-email-shradhagupta@linux.microsoft.com> <20240307072923.6cc8a2ba@kernel.org> <20240307090145.2fc7aa2e@kernel.org> <20240308112244.391b3779@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 8 Mar 2024 19:43:57 +0000 Haiyang Zhang wrote: > > Seems unlikely, but if it does work we should enable it for all > > devices, no driver by driver. > There are some existing drivers, like mlx, rmnet, netvsc, etc. using percpu > counters. Are you suggesting we add a common API for all drivers? Hm, I don't think mlx does. The typical use case for pcpu stats so far has been software devices which don't have queues, and implement lockless Tx. In that case instead of recording stats on a local queue struct we can count per-cpu and not worry about locking.