From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2C30C54EBE for ; Thu, 12 Jan 2023 23:47:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232470AbjALXrG (ORCPT ); Thu, 12 Jan 2023 18:47:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232594AbjALXrE (ORCPT ); Thu, 12 Jan 2023 18:47:04 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E26251EC6D for ; Thu, 12 Jan 2023 15:47:02 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 07B54620B6 for ; Thu, 12 Jan 2023 23:47:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC6EBC433D2; Thu, 12 Jan 2023 23:47:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673567221; bh=1cn4fcmsP8g2d5ZQgmZSXV/6Ieop9waXm7iOOHFPEMo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mw8wpPXjUEK74eVKEE0kZ3JzR5rXbxTwi0dLRoA6cCUHaURR45jSzIeVTBSlTEpIX OnoQpzqHh2qazMNmTVtdIglUHcOewqzq5KvSky7HGzR+Yh9DsjSVCxWLLW/hQZtGaC tzDDGmupvpkSRpUSthvTckz6wpPoklAjToQOWJfR6wqIz8WcNMMpGnS8aALxYPLZub cZD9FkmmeAx+XG16d9ExPwoh+bIPlv5l+1JLMd+qM+InhTSyNTukLWQ9Z1AdSYZoK5 4gh4UhxazoAt4kTLjj3QV9zTwBv5V4sTH1XC7ZcSavlTPyGB0PmOSsXyPztHQe1Fn3 6VtvTCLbgl4aA== Date: Thu, 12 Jan 2023 15:47:00 -0800 From: Jakub Kicinski To: Aurelien Aptel Cc: "linux-nvme@lists.infradead.org" , "netdev@vger.kernel.org" , "sagi@grimberg.me" , "hch@lst.de" , "kbusch@kernel.org" , "axboe@fb.com" , Chaitanya Kulkarni , "davem@davemloft.net" , "aurelien.aptel@gmail.com" , Shai Malin , "malin1024@gmail.com" , Or Gerlitz , Yoray Zack , Boris Pismenny Subject: Re: [PATCH v8 03/25] net/ethtool: add ULP_DDP_{GET,SET} operations for caps and stats Message-ID: <20230112154700.46d148ed@kernel.org> In-Reply-To: References: <20230109133116.20801-1-aaptel@nvidia.com> <20230109133116.20801-4-aaptel@nvidia.com> <20230111204644.040d0a9d@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 12 Jan 2023 18:50:16 +0000 Aurelien Aptel wrote: > > The implementation of stats is not what I had in mind. > > None of the stats you listed under "Statistics" in the documentation look nVidia > > specific. The implementation should look something like the pause frame stats > > (struct ethtool_pause_stats etc) but you can add the dynamic string set if you > > like. > > > > If given implementation does not support one of the stats it will not fill in the > > value and netlink will skip over it. The truly vendor- -specific stats (if any) can go > > to the old ethtool -S. > > Do you mean that we could use the dynamic string approach and just > define the counters names in netlink? Our concern is that it will not > allow us to have those stats per queue (as we do in the mlx patches), > in that case we can suggest reusing ethtool -Q option to request > per-queue stats. What do you think? The standard ethtool interface should expose the accumulated stats. The stats of finer granularity need to be reported on the object to which they are scoped. I'm still yet to find any practical use for per-queue stats in production. IOW report the cumulative per device stats in ethtool -I --your-switch. The per-queue stats can go to ethtool -S until someone actually finds a good reason to read them in production..