Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp158532lqh; Fri, 3 May 2024 17:34:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVhhMYF4hZNOfPXWbvIwssl+EFcIzvgT7ZbXXFrx8FGOsRz9JIh1Bv2rA5z/1L4awMS30JYFsfcR7KYKXAjTeXMnmneOi065k7jXxQVpw== X-Google-Smtp-Source: AGHT+IHnjxU7yZDGcmbEiQbBlaSljUq+ZpSS4NYhZDkrr6Mf7ku96ldnj+Kii8O3BivA2zbQIMfP X-Received: by 2002:ac2:5291:0:b0:51d:6f62:1ba6 with SMTP id q17-20020ac25291000000b0051d6f621ba6mr2706571lfm.3.1714782883813; Fri, 03 May 2024 17:34:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714782883; cv=pass; d=google.com; s=arc-20160816; b=TRC/+y+zZ2vo+IUDXnterqPz606kq4n1UMq+iqlRzw5KBaXR+Jdp7tBkG+cN1nVgBP zRhwfDm5FWC7kpTaJN1hQTBA5e6IjUwJZhyUEhQBGBXTlQwNdZjS61AMuvATAqcS3Ypu 4laWiAP5SK97IJm8ynkLc3/3W8rAuoydiqWiIb9YEuByXFHGDmOXrFhBb2p13ISsFBey 3Ho60ukXdST94DpDY9+i/rRaPzPyVY8TxAFFRXfdHs4noRKbstZZzdgzR8kSjkbfFMUv /+uCAwoK4lpkwdHLTxGc33pC+9V6nkQSdgEcsy7+WbGtL6u3PAggANitFjXbkIuZ7pk1 fN/g== 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=pdmhW+tBCdf/8mGQgyLjVDGcmpNT/Swt6gH5v/yYBIQ=; fh=8YueATATMxEW5JgZEQi+/kGF3X5aBpUyB7JVFc53WqM=; b=xTV/4XdrsiBc+IQhkVQCw9kMxjwUAMN+QlJ3bSDrI6aRu/j0HJOp1AlFNC5+4VMPnz 1TsK49+gsdFM6tFTdp2jFA0ny9xLHpyZ6LaBiozkNE39G11sLjivzOswHj3lUDmpqJSK pgRkcmoDmG2udlK8LT84XGy3/WFdE8/dIZvOGSNK5aIS4XbAnB2U9EEXUGZRrlt3LeGL 26G6SXQP5OaX4FcWA7FIEp2iU/o9LNq6PXeXrCq11vcAOe/c9uguR9AcZrVhO2xjhugS 9lZQv1yalUSqji1ih+Xvf34I+vebD8b9dLG78I0dGjMiCtdoJm3sDMgE0hSewP5FfFoa hacg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Erl6ibWp; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-168457-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168457-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 l20-20020aa7d954000000b00572a75e4a9esi2073990eds.516.2024.05.03.17.34.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 17:34:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168457-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=Erl6ibWp; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-168457-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168457-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 83EBA1F2368A for ; Sat, 4 May 2024 00:34:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BAD384C7E; Sat, 4 May 2024 00:34:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Erl6ibWp" 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 DA418A34; Sat, 4 May 2024 00:34:30 +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=1714782870; cv=none; b=bGqo3DvYmQEh2KOvAX/NbFl86LPx8OSAHqrenozwvdi19Q0s9tciY6zVJwD5LIvIjLw7Uwo6Jj/k3RXeuZXJzXflAM+99csJcENsNu8pzDCyWmHKpyXBC0mHG3UZRnOen1hQh6FwRTDVnURZ/hahHdxGzp1kye097SunObcOhWk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714782870; c=relaxed/simple; bh=ytSpzR7FtjeDpuJHulZAVt5ZkXDD+l+3IoK21E5XNlg=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kmanyvEPU6XO535i8577LygzO2WtT2pqEj10C86HRX2QLN2il58JBW/z6LzgLcBut8rzRup72eUxGMS4D3dVg6sZ60ueOgV9tFz3cWMWnaEO9kYL+U7XxpM8JL8JppmldLRsrAOCl2XEh81NEFKjGtESMSNKogdcvk8KfE8ucEk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Erl6ibWp; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04939C116B1; Sat, 4 May 2024 00:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714782870; bh=ytSpzR7FtjeDpuJHulZAVt5ZkXDD+l+3IoK21E5XNlg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Erl6ibWpCIPw1YsmxSw5hY6v0Z+3xvLlYV9yUSQdNH1TeFu847HPm/WoCUVmqltox 2N+om4AkIF63pnC7JmkfarrIl0A94n4gWv39NHMD3Gy03JdTOG6d5OM5QHANBft2d1 /jPcQbA6Rq3M1KZpuGiGbR3UPOZ93ZQJzymLLfpsTvN4WjmpIaHdM2f5dRr9UBnuw+ pKTK7TA1s+JXNVafYHLj2qBgOiTe/z9MrO71IBS0FERoAQPqW7t+bvST9CvrgfU4Ps omtIlwxziMGtCEEkdmMRsuCS/9HXZT/htTz/FRKNnAom6TbFJt0nCrwVgR0J+ZnB1i qlS0OQebZCpKg== Date: Fri, 3 May 2024 17:34:29 -0700 From: Jakub Kicinski To: Joe Damato Cc: Zhu Yanjun , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, tariqt@nvidia.com, 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 Subject: Re: [PATCH net-next 0/1] mlx5: Add netdev-genl queue stats Message-ID: <20240503173429.10402325@kernel.org> In-Reply-To: References: <20240503022549.49852-1-jdamato@fastly.com> <20240503145808.4872fbb2@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, 3 May 2024 16:53:40 -0700 Joe Damato wrote: > > diff --git a/include/net/netdev_queues.h b/include/net/netdev_queues.h > > index c7ac4539eafc..f5d9f3ad5b66 100644 > > --- a/include/net/netdev_queues.h > > +++ b/include/net/netdev_queues.h > > @@ -59,6 +59,8 @@ struct netdev_queue_stats_tx { > > * statistics will not generally add up to the total number of events for > > * the device. The @get_base_stats callback allows filling in the delta > > * between events for currently live queues and overall device history. > > + * @get_base_stats can also be used to report any miscellaneous packets > > + * transferred outside of the main set of queues used by the networking stack. > > * When the statistics for the entire device are queried, first @get_base_stats > > * is issued to collect the delta, and then a series of per-queue callbacks. > > * Only statistics which are set in @get_base_stats will be reported > > > > > > SG? > > I think that sounds good and makes sense, yea. By that definition, then I > should leave the PTP stats as shown above. If you agree, I'll add that > to the v2. Yup, agreed. > I feel like I should probably wait before sending a v2 with PTP included in > get_base_stats to see if the Mellanox folks have any hints about why rtnl > != queue stats on mlx5? > > What do you think? Very odd, the code doesn't appear to be doing any magic :S Did you try to print what the delta in values is? Does bringing the interface up and down affect the size of it?