Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp909190lqo; Wed, 8 May 2024 21:11:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUKxDGvyi0yvJb1Rcna8idyVMj9YJ0gCfDSUdvoN+WE2BaxXMtsm2sUHALASJD+yvnqVyxwaKB8FXOE8vYKnRAkOXD2W9Me8Wd1whetGA== X-Google-Smtp-Source: AGHT+IGNpt6hkath531wK8OMKMLxTEqR1s/drDBKGFyteXnU8/rslJbd6p93JsW7MuP3+QsKmlKk X-Received: by 2002:a05:6214:20a5:b0:6a0:d701:3de0 with SMTP id 6a1803df08f44-6a1514e6195mr51489866d6.59.1715227909602; Wed, 08 May 2024 21:11:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715227909; cv=pass; d=google.com; s=arc-20160816; b=hxhfMdS5C4gp6nSwYiabgnl9jt6FRMh9YdixeMumXDpiavoRSaF2xpriSKbkSrkbih Ma25ubl+OkrLspS0VgnlcqVtQYi36ch7mY6mhAOMR8zvjpMJ5GlHwOBKYrm55pg8DxP/ Gg1P+ryeZida8jPLSPBG0+ALn2Pnr240zZHQuwms5jJNGHVgFch+rySZ5MGb1hbu1cPX 8mbD1ZqbYDxqCtdaA80SrZ9llV5Z8BUs3TrsE4KP48pfMGP3do43mSBz8k7lFEhbtaQi Gq9IC7fsrc8ZVDaypMYLckOili3t+TbA5L290luPaH+8dB4urzajL2zE/y0o93z3uvRT ck7w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BquM86FdyvTwrPBmMgArwClBgJHZfCecZ2xsyzp4mrw=; fh=l27RdbFmjud+Al+buX+UmfSvclTE6vABuTt1ouxXR2I=; b=tFXwZwIX9OF13VBcCHtyssCwrBftmXUhE85o7iN4ml+ez/g3Rh3Qu3en1MnwJ6SClH SVcITZQWd2LSKDqcB+gc/ZCz1ZgzfubM41C9trKhmek8dDgVZsn6Xk+ROH4RRDKWfTvX wxrtBFUm2IOMG+XHnFDuG2vmMFwYI3jXbt+N5mbR4pAu1ED3y25Do5OX10UK/eqLBMIm qq/4bTkbFtZQdjTxWlhnBDIoQ3nOE7U8M9TMg3m7qy8EtNNsvYKTJpRZ0Zp/BKS1PNoa VTRPx1qPDoMni4o0P/+XJkS4MZmKMRqmdsNYeisHx0BO33E72KpTvJ+mAfANMibWB1xe BPFg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fastly.com header.s=google header.b=ruZqvsCK; arc=pass (i=1 spf=pass spfdomain=fastly.com dkim=pass dkdomain=fastly.com dmarc=pass fromdomain=fastly.com); spf=pass (google.com: domain of linux-kernel+bounces-174117-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174117-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fastly.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f29abc3si6070276d6.241.2024.05.08.21.11.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 21:11:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174117-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@fastly.com header.s=google header.b=ruZqvsCK; arc=pass (i=1 spf=pass spfdomain=fastly.com dkim=pass dkdomain=fastly.com dmarc=pass fromdomain=fastly.com); spf=pass (google.com: domain of linux-kernel+bounces-174117-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174117-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fastly.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 54C0D1C2218F for ; Thu, 9 May 2024 04:11:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DBD86148307; Thu, 9 May 2024 04:11:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=fastly.com header.i=@fastly.com header.b="ruZqvsCK" Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C27B826AE0 for ; Thu, 9 May 2024 04:11:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715227900; cv=none; b=X2PeAIyLUv9rtHa89u9O3JLpmRsC4YKw7PToVDcn7v0vY08qYi5gm9wx+nYQtspLZQ1zoQN+bzyv2tCODpoSDojCoM/xvFGmrmpmleZVeIBPDBW1noFXrZPA54QCNbmHXbT7wb3vNoa0Z9E9+fHV5QCElVItlVJFFZmtMNz21YA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715227900; c=relaxed/simple; bh=EuD5rGws0oPE0xiAPheoEoxDAQyOqvEFoxH7b515VT8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZuOpg740PtuUYxT55lmHm0o7qkUbquO1MaxkPojaT/7wqu7MJ/m1jXc8Xws1oLrETL1H88Zgu2rh1O316pXSACvdpmi+CrgwXWepDWcpl5t+uGaFMo865tQqqD5fHNvANyl3VgUjB8S1kFWWYteZ66+z9oP4rzTrtQb4IqJyRFQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fastly.com; spf=pass smtp.mailfrom=fastly.com; dkim=pass (1024-bit key) header.d=fastly.com header.i=@fastly.com header.b=ruZqvsCK; arc=none smtp.client-ip=209.85.210.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fastly.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fastly.com Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-6f453d2c5a1so455428b3a.2 for ; Wed, 08 May 2024 21:11:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastly.com; s=google; t=1715227898; x=1715832698; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=BquM86FdyvTwrPBmMgArwClBgJHZfCecZ2xsyzp4mrw=; b=ruZqvsCKtYkD71cVib3ALNpeZZ8cim29EZ+2akNN0Aty4Y7tMceiuhGvuZ5AenT4r4 PsW7nSht5KsJahYja+PKkwPcdLSLCnlwMU2n+cF2j57aD/P5dvJ5VSX47CvUjimhtXmi znq/rCDZyj75mI9Vr7CDIHagU9J5iPhIpaYFw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715227898; x=1715832698; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=BquM86FdyvTwrPBmMgArwClBgJHZfCecZ2xsyzp4mrw=; b=jTIyss8qBj7asWo83oE9270kgsmC5fvrVy/CftZXq6xGAQAdBauUKy5j7jKCRnSLrc clSmh+ozzs5f8PGl96zy5m9yvZYmoWMqmTW5eqNMquG25v5HtDG0togoy0YKx0cUtDWJ Y6SbBrs5rNDjuI1f7mpSa5dtE/mRmHhQOni4RiUuDQZZ/dRSfdxAwZ8KPuzutXdS/Ggv gCofA62Btdx8ylGGchczyZXcfH+xlElzHSrXz9LYqGoOQ8FotrZvwlNOy/PwpEfrolBk y4hwnl9cYPuou/+6rnRyl67P7+JPTdRW5FkHkFGSMioKBe/IT7Po+7b5kCTNZK3wWObN NWQA== X-Forwarded-Encrypted: i=1; AJvYcCXWfg6mvPwTxL/rhiCSuZY3hcZJzGVspiKP2FN3Np7pSUKtPuR3vukRKQsNsuPVw/T5eZaQH6+aZ7G9trGb919T8TShevS/Y6smCVg1 X-Gm-Message-State: AOJu0YzJbUF8hYQyGh/NrFIuZlgI5bnnwzc3RP9Ch+irHgXPF2LfP+7C PaMUEbfQz3RnFwrXkXilpK5RoGP9ilhDnbYlCYcZAIJxbgCm8OdMTaFK0XxlrRM= X-Received: by 2002:a05:6a00:2d88:b0:6f3:ee9a:f38b with SMTP id d2e1a72fcca58-6f49c206b5bmr6352615b3a.6.1715227898075; Wed, 08 May 2024 21:11:38 -0700 (PDT) Received: from ubuntu (c-24-6-151-244.hsd1.ca.comcast.net. [24.6.151.244]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2a86a2csm367073b3a.78.2024.05.08.21.11.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 21:11:37 -0700 (PDT) Date: Thu, 9 May 2024 04:11:34 +0000 From: Joe Damato To: Jakub Kicinski 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: References: <20240503145808.4872fbb2@kernel.org> <20240503173429.10402325@kernel.org> <8678e62c-f33b-469c-ac6c-68a060273754@gmail.com> <20240508175638.7b391b7b@kernel.org> <20240508190839.16ec4003@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: <20240508190839.16ec4003@kernel.org> On Wed, May 08, 2024 at 07:08:39PM -0700, Jakub Kicinski wrote: > 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. OK, I'll omit the i < ... check in the v2, then. > > 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. Yea, it looks like priv->channels.params.num_channels is untouched on ndo_stop, but: mlx5e_close (ndo_close) mlx5e_close_locked mlx5e_close_channels priv->channels->num = 0; and on open priv->channels->num is restored from 0 to priv->channels.params.num_channels. So, priv->channels->num to priv->stats_nch would be, I think, the inactive queues. I'll give it a try locally real quick. > > 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 :)