Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp846735lqo; Wed, 8 May 2024 17:56:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXMiKeh0JeFNhaUq3LN8z99HDStpAu4dSCl9mxdaJdybrzE63Bq0xGSXgPQaQx8oRsJwxBQkO88GzrAIoLIZH4yZrrpT8tiz0g8nLUtQw== X-Google-Smtp-Source: AGHT+IH/TX+fDf6yeGyJ10jN8UjPYZOjDSmHlguKoeVhcOkGshRMD+OYIbBvkjlAnEYSR/g97GWa X-Received: by 2002:a05:6808:1894:b0:3c9:6ea5:f591 with SMTP id 5614622812f47-3c9853068b4mr4218495b6e.44.1715216214697; Wed, 08 May 2024 17:56:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715216214; cv=pass; d=google.com; s=arc-20160816; b=WWsBsp+mgZ7RHzebZFsEFRue5NWtZJdcYAaGxdhbxS/YfjmoQqEZ6/R61cnFt4yACT LA3exfbuRCEVpThCnv26/BEjtacqoKdnPfZdFUlQPTe7HmaajtLjlKoTAez+epHgiXij VxxYlX0/5TYMFNnx0Zoq4MUD7igHJ4BGfCYXK8sCK7JjGP44YM+Gg5p+DPXGeMJ+KC6F k6TI1bjXmGlBsoiKXCupIdWBT6saOUGHrOZlhnUcT+Te11UszS/A3wMwgTfkRoxibzg0 oRJ1AgNGLQ3XQOz8ZgCRm8PY3W7sHaE7cV8CSkcIIh6JbNLr2YKmhkjruWZP8aVQrNAa XcVw== 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=W2u0VPmSrw+Omh8NJMCldcZURzFmxi2dQUvfG+HWyQo=; fh=V/6pF9W+V2soTvpd9sxFARq1g1TH4Wk0ilX3I/ORYII=; b=PmRLmo1D1ZeA2xAifnjd/kRTwPggZX401KUJlnws7xSboGmzHZRs/cIF/07oG3xQRd Koq22o5/bIGMM7gLz8thHJUEBR8Z28i/P9iv+Gwxy4CjyVKFgmr8HKs9Be4bU6+YfFqW aPevMlPtvl7HzUMuHzlyNZtqhIUhkCvlfaD1LTOMx7p0AVmpIPzsXX0+/ny9f4IWf1RL 5X6QhVaICuTsdKH2btAMfGN6HdshM2kDoVL3oFHx+DI/rMYHvTgK1t1jK9mAuTJZxqtc VQlgFb96cJZ16Lm97gnytPkZ//Abob3TWUM4obW6PfMZg+wipd5JlrlTyJZNLYH1xdYc /IlQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BQuOSUjU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-173988-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173988-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 6a1803df08f44-6a15f1d731esi3564716d6.116.2024.05.08.17.56.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 17:56:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173988-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=BQuOSUjU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-173988-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173988-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 A80CF1C2171B for ; Thu, 9 May 2024 00:56:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9FDD63FB14; Thu, 9 May 2024 00:56:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BQuOSUjU" 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 B9896199B9; Thu, 9 May 2024 00:56:39 +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=1715216199; cv=none; b=O19QzWgbkGx8j+obPx3Z1C6QwXpj3w+Cyt+HPTLLrKxiUQ35y92aWe4rlGyMFIZHZ3Df127FFpje7JLGLcO+43dAbc+Pqvgpm3YFxh2NbaXjz0hT3CnV9eXZM8yhQ6tzQOZpeddTBRXPj5VC3tzKDiDum30/TpmZ9NMx5/EnTWA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715216199; c=relaxed/simple; bh=Rw11crbnuQ6fU3EEzrTuH2bfFNBuwuRmqc1xYSAsUAg=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=W4y8jLN+zrKbH450+R/avG+gfXicYUES6ExriLbfc6p7Vh16RTYyk26iiIcUpItRkGhjY/+4NBrnCrbRTUVXdoYdwcjv5QO9+9GgwcE6cBAhtOTP1fVuWWiwtjBjlMb86+k3wONfOyhdZaUosn40bRQ5FHD7svL09IQ+aqvK/2c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BQuOSUjU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21C3AC113CC; Thu, 9 May 2024 00:56:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715216199; bh=Rw11crbnuQ6fU3EEzrTuH2bfFNBuwuRmqc1xYSAsUAg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BQuOSUjUgz03tQE/6+Ukix4akBBd1J0kU7yO4iOr20hDZv7f+8kAkVhH0OxkGWgD9 zjJhpWgwk9exov4OC8uwQS6UijUWPRpknDLuh/PtSlxjyIlgyov78ZAzIUEyL2F5iW jhFe6F05mDiIURchpmP0IXFFjgCOuhA5ITiz5TVlb3P86qZ9bU5SY1AT0J+ne1w6/m Q7q4ftB4jAbkQ3o2SA45gJMEXOv8w6gBv5yyjQmcDNG3P73re5V0tM4c39yLjvrspX RZx39sXMwKkvrR7GcPnieE5P3BOZE4Os08aS7ivCMsZvaQrQKNYSIJ/XCKPGu2nJHI lrDrAxiGxDHXg== Date: Wed, 8 May 2024 17:56:38 -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: <20240508175638.7b391b7b@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> 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 Wed, 8 May 2024 16:24:08 -0700 Joe Damato wrote: > > A possible reason for this difference is the queues included in the sum. > > Our stats are persistent across configuration changes, so they doesn't reset > > when number of channels changes for example. > > > > We keep stats entries for al ring indices that ever existed. Our driver > > loops and sums up the stats for all of them, while the stack loops only up > > to the current netdev->real_num_rx_queues. > > > > Can this explain the diff here? > > Yes, that was it. Sorry I didn't realize this case. My lab machine runs a > script to adjust the queue count shortly after booting. > > I disabled that and re-ran: > > NETIF=eth0 tools/testing/selftests/drivers/net/stats.py > > and all tests pass. Stating the obvious, perhaps, but in this case we should add the stats from inactive queues to the base (which when the NIC is down means all queues).