Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp157709rwb; Fri, 13 Jan 2023 21:08:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXtmITJUQwDblFsKempaD2NDirYY+ICvmhAM/dHbuJwlLdwU9jVL4CUl8XFpUstz90+fFXB8 X-Received: by 2002:a05:6402:381b:b0:497:233d:3ef4 with SMTP id es27-20020a056402381b00b00497233d3ef4mr33017505edb.22.1673672907533; Fri, 13 Jan 2023 21:08:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673672907; cv=none; d=google.com; s=arc-20160816; b=HOcZyAQYR0/kMQvq6In/WMSPu7UOwuRHMZ5vaGPXAaiE//FcNQzaPMtOW2r0+aCrbt g+zAUAS9j7iDVBaBTtSLxPeIkdcZKI4QlGBioCFeI9NYlfLBqgVWQkXEBhr4ueuPMVJl jJcWmQ0lr7cQL1YKn7MiI6Dx3iP4nsr801+7bwvJezh9FIGzyu8yrr/uO/kH095XLQ5H hlYudXD/pzbMLlu96ck9XzmCV/z+OSe+cNaYQSGujW4lOmWn8+ty5FFfutGhZ709u8Hf 0StpkeCVm1M2ho9uJEASF8IWJNiHeEeLL76sJNEs/lTTub3Czi5ndtJSLNd7p4HQCOhL uuqQ== 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=u9X+CqRM8ia8cbjA1QrJpuPJqCGzLHvOsBvoTbqlJvY=; b=SIaxGtRfNuvfA3u7G1rCeBbfIA7w4Zsob55WIPySD2siXCxMaAmMjNqGVrkfwWAwCs qUKJJ9cS7Q8Z4tvdFXwHMd+ohfdeFxAIeaYtT8UQL8luGbEtpT40rxWUlq22bM0god4f mALwCP56e/6nNRJBhBeUe6LqIdXm2FuKSur9c9V70d9vW5lGCz/Ja3lusWZ5BPJzQ1hw WTZf6hEuv9tQsdF4ZTw2MI6DkbiruQ+l0QyMyem/kgWtB9CHvtt3Pszik9fn6dJrdgNQ Wus0yBgcj3BpOodJtehi2+7u+OCMbjlo4A8lEWrKdJgO6hbTo+Mu5ygXkkydponm+7mk Q3hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dhZOMye8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc33-20020a1709071c2100b008674dc31401si7364830ejc.632.2023.01.13.21.08.13; Fri, 13 Jan 2023 21:08:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dhZOMye8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230036AbjANEnm (ORCPT + 54 others); Fri, 13 Jan 2023 23:43:42 -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 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 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.