Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4617081iob; Sun, 8 May 2022 19:22:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPBkf7VT3FU2TEEQnF4XUFfEoxO7ottA+mbde2Dbr+GcBnTi1Rp7/q8DUA5a9i0TfL23kR X-Received: by 2002:a17:90b:70a:b0:1d8:5662:6de0 with SMTP id s10-20020a17090b070a00b001d856626de0mr15658215pjz.212.1652062924479; Sun, 08 May 2022 19:22:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652062924; cv=none; d=google.com; s=arc-20160816; b=oCICGIr2qUDxhi+/NkHNgsLn+VxR3Y52CluTyZMhVIAXWTqYg6Rj+0un6g6a9bSsiH uJHRGyPI/1sd3E4hk2Ae60aXs22sap+BAvfh2IPhQXEZgXwMv9awdraOgeuwN3ys5DGh O4OxVud8DWgtQxaz9fHl8LCpvsWDsHF0gjtuD39OHybd7rZzsZg9QgiG1wEQtPeF2r90 v1O1Iib2Df1wJL7tUYljUDDqm/p5zJYNixvjAKs6NIFNrhUMx6asbPNZPV0lqEhdRFW9 JF9bEv86mCkEMOrcy6bRCbuaqlrlnR/+5tQCx7Y0cAvtJvIrgYjNNlsp0eFGsBR4haCM 9D3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=nokrj0PM19Oy7ujy8V02ORrH4tVbCkzSHTeg+cQ7e7U=; b=clYOLbfAxmS8zndTEBCu3fpnnUZZ5vUDUWPPedq1CC0lkrYFpZSBe5hYXRT3NlvIY7 gUsEihMinDmcOHvC7FwvQnSvBxOet/XcLhWInjMzE4V1IIct0SiXcA74RdE+7gta5xO5 rxSRv/o9XueRlpqh4PomFhCTZNP/EdegYwO5LRqgvCIDzA1tYa0Pa4uITi660lcDylq+ pGr1lMCGOwhWUUElSKvvEYrehALaOPdTctrFr6/K3eauNuiNN11aM3dB3yWwJ0jiSQCi ya2GmXGoVm0ZAMlk4NGhl9tumCq96eZho3yZPaDpVKgoKAyxsyKVq5l84h5a9xf9zLLm s25A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LT4wRNGj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i64-20020a638743000000b003ab3da7b5aesi3988806pge.531.2022.05.08.19.22.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 19:22:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LT4wRNGj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 59A5B5B895; Sun, 8 May 2022 19:21:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443627AbiEFQRn (ORCPT + 99 others); Fri, 6 May 2022 12:17:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443610AbiEFQR2 (ORCPT ); Fri, 6 May 2022 12:17:28 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E5886FA3F; Fri, 6 May 2022 09:13:27 -0700 (PDT) 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 sin.source.kernel.org (Postfix) with ESMTPS id CC7B8CE377B; Fri, 6 May 2022 16:13:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B578EC385A9; Fri, 6 May 2022 16:13:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651853604; bh=RNXYPpzzqTC2kkQ/NsqO9QLdya4gsEDpth7e/HPVT+E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LT4wRNGj/d9pk/wbLYfrZDYgHSM0i1N7zd6BMTvTZ1ta0NhbLRdJsG7Qu0WV4TPAR 6wLXugpRfuV2N7fxJFJj8VxNEmXmmFfWe2DMGVa85SOpxQMMsp6Z6dPdFOUJ/J4rFP U/FuaDF/jo8D9gWOoj3DIomtcrU3enEv1ndNvNWfN8V9ba4kp34ek25GcrksW1BeKZ byd4+8KA2RD1yjz/T109mx2Qih/XKiMmiEtJdewHdqGwdWzPEtRoCss6XMVjHuQ46d TIBqgHNkDyyQFMn8xkyuHnoSxo30HwSJNJkpbyqk7xWMhrHVj69bbhG40RIj9ozUds 9+kMDmkypfgpA== Date: Fri, 6 May 2022 09:13:22 -0700 From: Jakub Kicinski To: Maximilian Heyne Cc: Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Paolo Abeni , , , Subject: Re: [PATCH net-next v2] drivers, ixgbe: show VF statistics Message-ID: <20220506091322.1be7ee6e@kernel.org> In-Reply-To: <20220506064440.57940-1-mheyne@amazon.de> References: <20220504201632.2a41a3b9@kernel.org> <20220506064440.57940-1-mheyne@amazon.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 6 May 2022 06:44:40 +0000 Maximilian Heyne wrote: > On 2022-05-04T20:16:32-07:00 Jakub Kicinski wrote: > > > On Tue, 3 May 2022 15:00:17 +0000 Maximilian Heyne wrote: > > > + for (i = 0; i < adapter->num_vfs; i++) { > > > + ethtool_sprintf(&p, "VF %u Rx Packets", i); > > > + ethtool_sprintf(&p, "VF %u Rx Bytes", i); > > > + ethtool_sprintf(&p, "VF %u Tx Packets", i); > > > + ethtool_sprintf(&p, "VF %u Tx Bytes", i); > > > + ethtool_sprintf(&p, "VF %u MC Packets", i); > > > + } > > > > Please drop the ethtool stats. We've been trying to avoid duplicating > > the same stats in ethtool and iproute2 for a while now. > > I can see the point that standard metrics should only be reported via the > iproute2 interface. However, in this special case this patch was > intended to converge the out-of-tree driver with the in-tree version. > These missing stats were breaking our userspace. If we now switch > solely to iproute2 based statistics both driver versions would > diverge even more. So depending on where a user gets the ixgbe driver > from, they have to work-around. > > I can change the patch as requested, but it will contradict the inital > intention. At least Intel should then port this change to the > external driver as well. Let's get a statement from them. Ack, but we really want people to move towards using standard stats. Can you change the user space to first try reading the stats via iproute2/rtnetlink? And fallback to random ethtool strings if not available? That way it will work with any driver implementing the standard API. Long term that'll make everyone's life easier. Out-of-tree code cannot be an argument upstream, otherwise we'd completely lose control over our APIs. Vendors could ship whatever in their out of tree repo and then force us to accept it upstream. It's disappointing to see the vendor letting the uAPI of the out of tree driver diverge from upstream, especially a driver this mature.