Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp340929lqc; Thu, 7 Mar 2024 21:31:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWM6moO3UrunZ60B5x/novSIAt5NKm73oQHWDtPH9Xa8hPiaAjxsR9PW2cOj2XHajNFNhu6pyRHdwt3QduR5R6sq8hCmzKEPf5bFWT7uQ== X-Google-Smtp-Source: AGHT+IFMXi/1hKkGY9QthvwtjN4AgVwj5G83VTvDNGnfTmpL0X1DPxPWQ4x3BqCi7Cpf73AxHRC8 X-Received: by 2002:a17:906:48b:b0:a3f:d2e2:4ce5 with SMTP id f11-20020a170906048b00b00a3fd2e24ce5mr14754311eja.29.1709875876743; Thu, 07 Mar 2024 21:31:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709875876; cv=pass; d=google.com; s=arc-20160816; b=Oyr/ml0Szb8DGMS6GpmHsDeuabhf1+M667cFOh1KZNIeHueC3sOe5JhCRpcK/tcnxx iQt86/2YZ8iJuQ8iPYbzEvMsfbvbmqqvnFaKd3zA57p2sqDq2gyC79otzVngiVQeoy8R bdIWcJy8XxId/oZV4KZJ6qYh+JVS6gfxAuzlobLl+gEOa4Wqy4oGZtLYjajuZQXbj6va 5Ty+mIPWSZFYytx8Y0w6nmWoHzjFUaKvNSVZ+0tJO9fP0jqa/yDhiq2YqEER4pbhD+bS kzU3EL8ZlHp0zH36zoofGFmrupib2bbwOEsCmqByH2f5ifG2JdTVlRWOwWz4irQrzvBH eqRA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature:dkim-filter; bh=u2kPWb3IsqjyN6FSEPkizuq4H3ww/4ROAGYubZNDML8=; fh=BgBXXoWV+RZsZAQD5ISlQQ6sC9RBCf3YMptt9I2THPI=; b=AQR2FgZvwXXFj5HVDWRkgf1tByCvUJ2Bz9vjQAoTM4JsT/9+T37d8z1Bl5ZWGczq6v Bh5d/W7MQwjigS9zoKuoK/NKXCFkbbbLFnb4n8qxRrFn5MXxkzDKaXEnLTg0f/xWfVH+ N4o2l1tRaJaI30VirxfpCh4qv1KgpMqmLTTP7K65vN6nrFi1U0nttI2gf6wzKLWa4T4m eRjSEEgM7C/iTJAa9ow5BWvEUGpI22SBFIPr/R5YE8TLnWjOwl+EgIkarnDL6NUp/k6e xFurQCUfTVFklDfhVAItle9WxS3+vObY3y50u5ufDZ38KbQyH8I4MwQAEPzH11xMjBKo 5wJA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=PTfa9+jt; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-96529-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96529-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id m21-20020a170906581500b00a3ef81bc5d7si7724137ejq.770.2024.03.07.21.31.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 21:31:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96529-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=PTfa9+jt; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-96529-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96529-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 730181F22C56 for ; Fri, 8 Mar 2024 05:31:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 537AD3308A; Fri, 8 Mar 2024 05:31:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="PTfa9+jt" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F8032564; Fri, 8 Mar 2024 05:31:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709875865; cv=none; b=XGNas+N2e3NOLOB41tmxc6zTx4NHVA+cKlPy0ZxNbMtTh4iIQnTGqzPn+nCSbpQCvzqHgIEB8AoRvEavIGeY+Hp+mHeNkkhtn6nfDOPDxm1xLFOGRnG74Th6N5J6KCZC2eQCkvPl7nXO/MWL+8m/GKdxz/X/17k7TdJ7f0RITO4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709875865; c=relaxed/simple; bh=4QA+qfkTVt82T4MJ6mB+KmRrnBaFSpMS1IGiL/1JjJ0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nMoSf8/pMBCSoPeCal5+i+72QuACjYleabrCtrwzpSTT7Lc6yj/Dqs9ViKsSEhMlpmlazWy04NxI1tAJJOK8PoVlil6zwIMCmVUFFONfZFQpRF5UdJYIxAYUVlpxdJHRyzoY6affHUFACS/nVJP4jy7NRxeLgVvpKWJBnZuRA1A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=PTfa9+jt; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Received: by linux.microsoft.com (Postfix, from userid 1134) id 238CE20B74C0; Thu, 7 Mar 2024 21:30:56 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 238CE20B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709875856; bh=u2kPWb3IsqjyN6FSEPkizuq4H3ww/4ROAGYubZNDML8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PTfa9+jt0Q6hKwjBdaXtnHtFyd5ME7DtKa/Q8PYhW+s6pOgjSxmzLDFquvbnH1yh7 4oaRwleRRtKqtNLao+7oXEFtJ67BPVLXXgglcbspIIUogItaQ2qhuJVT9N9+697WD0 vnRBA/gNCCbPWUJF689KDtyKXn9qEWGZjtVTqdr8= Date: Thu, 7 Mar 2024 21:30:56 -0800 From: Shradha Gupta To: Jakub Kicinski Cc: Haiyang Zhang , 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 , Michael Kelley Subject: Re: [PATCH] net :mana : Add per-cpu stats for MANA device Message-ID: <20240308053056.GA16944@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1709823132-22411-1-git-send-email-shradhagupta@linux.microsoft.com> <20240307072923.6cc8a2ba@kernel.org> <20240307090145.2fc7aa2e@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-Disposition: inline In-Reply-To: <20240307090145.2fc7aa2e@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) Thanks for the comments, I am sending out a newer version with these fixes. On Thu, Mar 07, 2024 at 09:01:45AM -0800, Jakub Kicinski wrote: > On Thu, 7 Mar 2024 15:49:15 +0000 Haiyang Zhang wrote: > > > > Extend 'ethtool -S' output for mana devices to include per-CPU packet > > > > stats > > > > > > But why? You already have per queue stats. > > Yes. But the q to cpu binding is dynamic, we also want the per-CPU stat > > to analyze the CPU usage by counting the packets and bytes on each CPU. > > Dynamic is a bit of an exaggeration, right? On a well-configured system > each CPU should use a single queue assigned thru XPS. And for manual > debug bpftrace should serve the purpose quite well. > > Please note that you can't use num_present_cpus() to size stats in > ethtool -S , you have to use possible_cpus(), because the retrieval > of the stats is done in a multi-syscall fashion and there are no > explicit lengths in the API. So you must always report all possible > stats, not just currently active :(