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 52BE0C3DA78 for ; Sat, 14 Jan 2023 04:43:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230021AbjANEnl (ORCPT ); Fri, 13 Jan 2023 23:43:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229894AbjANEnk (ORCPT ); Fri, 13 Jan 2023 23:43:40 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E819A4; Fri, 13 Jan 2023 20:43:40 -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 9C53A60244; Sat, 14 Jan 2023 04:43:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94EC1C433EF; Sat, 14 Jan 2023 04:43:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673671419; bh=Aw1JOVEKYhI6P8qbtUHjmC7jHC2m7SKSHccHTWk4hnU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dhZOMye8WuOwIbtWLRD2HsU6aDCR0iV7kCl3rRMnP3RvWOACTltc5Tm0ferN1uL3m vydqEMMX5tlNnntK9rTUyHc+JQ91q6xdD2ZJ5fHHx8g/MinjcSbJPCbEsBs0hMWwR1 id1avQjeVaNHl/6kOzqQ9LjQNOLcTg5bwNl8x+UnhioYfX/aQC2ZytjDl9tfLtbROP 19sbo19XVRPkeU+8swtsGsn3nw5jX7td6zXKqwmd//bmtPsMHrKmAXNY/Dlx0Mzd+R Rax0A6EfHNsUVCNg4gJKxVFYsBb1m7B5BLe6ge0UlMdVh9jBKmGuoVt+Yr/oBIekjY uRkX1vfLWy2gg== Date: Fri, 13 Jan 2023 20:43:36 -0800 From: Jakub Kicinski To: Vladimir Oltean Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Paolo Abeni , Michal Kubecek , Claudiu Manoil , Vinicius Costa Gomes , Xiaoliang Yang , Kurt Kanzenbach , Rui Sousa , Ferenc Fejes , Pranavi Somisetty , Harini Katakam , Colin Foster , UNGLinuxDriver@microchip.com, Alexandre Belloni , Andrew Lunn , Florian Fainelli Subject: Re: [PATCH v2 net-next 04/12] net: ethtool: netlink: retrieve stats from multiple sources (eMAC, pMAC) Message-ID: <20230113204336.401a2062@kernel.org> In-Reply-To: <20230111161706.1465242-5-vladimir.oltean@nxp.com> References: <20230111161706.1465242-1-vladimir.oltean@nxp.com> <20230111161706.1465242-5-vladimir.oltean@nxp.com> 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 Wed, 11 Jan 2023 18:16:58 +0200 Vladimir Oltean wrote: > +/** > + * enum ethtool_stats_src - source of ethtool statistics > + * @ETHTOOL_STATS_SRC_AGGREGATE: > + * if device supports a MAC merge layer, this retrieves the aggregate > + * statistics of the eMAC and pMAC. Otherwise, it retrieves just the > + * statistics of the single (express) MAC. > + * @ETHTOOL_STATS_SRC_EMAC: > + * if device supports a MM layer, this retrieves the eMAC statistics. > + * Otherwise, it retrieves the statistics of the single (express) MAC. > + * @ETHTOOL_STATS_SRC_PMAC: > + * if device supports a MM layer, this retrieves the pMAC statistics. > + */ > +enum ethtool_stats_src { > + ETHTOOL_STATS_SRC_AGGREGATE, > + ETHTOOL_STATS_SRC_EMAC, > + ETHTOOL_STATS_SRC_PMAC, > +}; Should we somehow call it "MAC stats"? Right now its named like a generic attribute, but it's not part of the header nest (ETHTOOL_A_HEADER_*). I'm not sure myself which way is better, but feels like either it should be generic, in the header nest, and parsed by the common code; or named more specifically and stay in the per-cmd attrs.