Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp871285lqo; Wed, 8 May 2024 19:08:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXgSfkQFdUp8Nx/B/hZqOwa7YeRrzdP65fON7maq4IVLpIZfZD3NAug41Q6kiH2fHP/gRuN/y0Gu0fcwH8pukVl+u9ISBL4ecERHF6JvQ== X-Google-Smtp-Source: AGHT+IEa0FSLmIi4hKK7Wb+kUBx+9nwUsEdeKbZ8lSm3Heh5eIEC17BzwaMqvxCimc8AI4JQHQDf X-Received: by 2002:a17:906:e2da:b0:a59:c9f3:837d with SMTP id a640c23a62f3a-a5a1184474dmr99031366b.30.1715220532530; Wed, 08 May 2024 19:08:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715220532; cv=pass; d=google.com; s=arc-20160816; b=j7FpyZQWUvcB7hj7D+teGmDptrAOAHxIAkkJ9N7BJpADrBkzdZeXZ/FxgyhIYcfJ5t vmBrbYjbRBXtCNx+7g812FM9azQMRGcQI67FiFmBSANVYWj5Q2MFZhTmBTK8lMkFnux3 c3MVtiZOqFRBb9bDUoF0p33EwOU+SccbNVYWklU1iojmr5QXvJH4Kcobh86ThHMQrJOa LylmYY2Be4l+0nMyYMCXRWEfTLJjE4K6x9cTs8QENKknE+5Ecv3B2CKy1P2AKU1ZxXiA bD5weDv8VDCS0O2//SDYzEElpRiO5masFuBPemf4nkYacmc+4hyqItjuQZaCCOAeA5JH QtMQ== 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=cxPpGyxx+5lIlJ8EqPpFVbXZ4jYTAo0gXr1VjlUXlHk=; fh=V/6pF9W+V2soTvpd9sxFARq1g1TH4Wk0ilX3I/ORYII=; b=jcicb/7flXk5AApLt7PyKbxXjxkuvZsjlawix7JrJ064P3Qx0Vf0xGAu2XeJ7E5FmC kdq7ukFFqNIurvkQOL5H51tEw5lqOAEHc2fPCdczbUO5eV/7fpAwSLBJzC4EHcMd/bUy +lW7jx+oF+ukeElaNFY9JT9w/SSoHsKcqc3h9XPawlM3JNVvFPvZtF5ZfZG54/SeaxU2 Eabs66gny49yiIBm/TF7iZrlhIq1tGGYbzIajDLpWzE3CkaRr6xiPmWuxhjxQosZQdBe 6CWWkxZVE62DmsFFjbGYoizLgM7wUFAxhol2BlXHbdjMEUsWqrSSOefmNOnU8q709dZ0 PDlw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ytvow39Q; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-174052-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174052-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733beaca42si229090a12.58.2024.05.08.19.08.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 19:08:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174052-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=@kernel.org header.s=k20201202 header.b=Ytvow39Q; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-174052-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174052-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 447C91F222BA for ; Thu, 9 May 2024 02:08:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B73E13C9D9; Thu, 9 May 2024 02:08:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ytvow39Q" 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 49E6A13C3D0; Thu, 9 May 2024 02:08:41 +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=1715220521; cv=none; b=T/3+ulXbozeYoy4Y/0+xuuZfivHw0JLfAzP04lR2Z+vwkELH6YkNuBK9otUpOllBP4SQf4CxzcV28GyMN1C4MRFIWOtmNn/1V/KTcIHI/voMANlNUb9jUWaa6Y6GpS+LJVewyIqWhvHDQA8onnI0z9oB78tuhVHb2rNieZQBqWM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715220521; c=relaxed/simple; bh=wi4UOMXZFrXWhkKLsJ6i0QwTQsRBrXq5/MZM7C2qQ/k=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kep/kokV1yYz4OujSj4Ud7U8xUsy3qCfa1O9jRBjUxvRfkH+8Oua/LL/eDmxuVhS3QD8iHIoTKvpk88PAqczbCxpH6OejP1EzPqSxehGW/jXBH7K9IdUsl0JvVsxfAEYcoWgQcd/wRZobE+Ju+0PyLnQGcf/XTmmBbrUCziebEo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ytvow39Q; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0A3DC113CC; Thu, 9 May 2024 02:08:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715220521; bh=wi4UOMXZFrXWhkKLsJ6i0QwTQsRBrXq5/MZM7C2qQ/k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Ytvow39QPv+f5IZb4WMdIHIUubO3ecosG4yB97vEZHWEKrN/1ynJm8t3OrgFmpJho j9jnGVnHN9/j8JpWzoJuKdE4sqTRT4stt8S6xluELW5A/YfEBGGob02wK+yyneOV84 nFVA82BmaWY+Fq8mJb1KhQjtZioqOFytfuUSCJbq8hD16cTzOmLOPP3y9CzIBdeUWd Yw4x4f8NeuevqdvSWpUrPBeZUHFdcFuxZYaivvdrt8GMOTrtgbovAdLQ4JkwzcpcuA gCT/wmEW4QIev2J/OaYjUEtjkVgoIpX6IRcMbqO0U0C+4aKd5DSLVko9sCzF4MyEFR avtfgr1zfqsIA== Date: Wed, 8 May 2024 19:08:39 -0700 From: Jakub Kicinski To: Joe Damato Cc: Tariq Toukan , Zhu Yanjun , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, saeedm@nvidia.com, gal@nvidia.com, nalramli@fastly.com, "David S. Miller" , Eric Dumazet , Leon Romanovsky , "open list:MELLANOX MLX5 core VPI driver" , Paolo Abeni , Tariq Toukan Subject: Re: [PATCH net-next 0/1] mlx5: Add netdev-genl queue stats Message-ID: <20240508190839.16ec4003@kernel.org> In-Reply-To: References: <20240503022549.49852-1-jdamato@fastly.com> <20240503145808.4872fbb2@kernel.org> <20240503173429.10402325@kernel.org> <8678e62c-f33b-469c-ac6c-68a060273754@gmail.com> <20240508175638.7b391b7b@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 Thu, 9 May 2024 01:57:52 +0000 Joe Damato wrote: > If I'm following that right and understanding mlx5 (two things I am > unlikely to do simultaneously), that sounds to me like: > > - mlx5e_get_queue_stats_rx and mlx5e_get_queue_stats_tx check if i < > priv->channels.params.num_channels (instead of priv->stats_nch), Yes, tho, not sure whether the "if i < ...num_channels" is even necessary, as core already checks against real_num_rx_queues. > and when > summing mlx5e_sq_stats in the latter function, it's up to > priv->channels.params.mqprio.num_tc instead of priv->max_opened_tc. > > - mlx5e_get_base_stats accumulates and outputs stats for everything from > priv->channels.params.num_channels to priv->stats_nch, and I'm not sure num_channels gets set to 0 when device is down so possibly from "0 if down else ...num_channels" to stats_nch. > priv->channels.params.mqprio.num_tc to priv->max_opened_tc... which > should cover the inactive queues, I think. > > Just writing that all out to avoid hacking up the wrong thing for the v2 > and to reduce overall noise on the list :)