Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp5389713rwb; Tue, 17 Jan 2023 13:06:23 -0800 (PST) X-Google-Smtp-Source: AMrXdXuRsSUhu+r18s05zzd2tQRDaLfEdhRV3VfBalSp+FgA3Qc5s2c5WVhxKfGBvGx69IfzAmLl X-Received: by 2002:a17:902:eaca:b0:189:cbf6:9534 with SMTP id p10-20020a170902eaca00b00189cbf69534mr4661228pld.0.1673989583445; Tue, 17 Jan 2023 13:06:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673989583; cv=none; d=google.com; s=arc-20160816; b=R8D6bYMrzUXxkisMtWaItvzDovoGKFUWfCK1o+u1sT9Yaywh1DT2Cw1LL8BS4V2i8p tq1HKf8cI77OGLQguSPaCNOG4gMLk2UQexqhoNM40IIKARQTGxWmJvtvXJ8vBdEQC2HQ seyK/H9wTEa5QXc3wv+kbgITO7z+s6hiUT9fIxEduWJ6aJo1LEibfzwKaZ5mUNpiOWpO oJCCP4OZbje+XT9D6WU+xCrEFoQAqjoWoFaXAQWK5PXIzz0s1qf01ZB1HECA682SwGzv iAjsNpK0Snm2H6COIyirGyrBufkb7eDXhJeqYzsgR8++xPX29J75km6e3WAiYA2XNA/8 DNJA== 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=ZPNWiDqOp2JO8sfAlNAyTGzzG45KoudXiE6BtXnwyJ0=; b=VcUh0JJGJpqVv5YdsrHpCMGR7EpwpBE7jiFy+OFBNOIfm3rZrnRkH2TL7pL007xouE WUiTLfru0ma6/Vv0RN8BlB68MCxl4gzMoevd0iFY3lIaL477B+EiG8QDWFUZuWxiNsA/ Ez/nkInixuw3q/+IKCMDknlzg+l677ZJ4U15jze/MSBCZt4sy+iCbq+57/DqMQN0bXs9 7kd5xdXw3axnGI/E1SxwU1p/63LtWJserX0IoLmwVv8PRJO7IgSR4I7W7B2C5Uv3aqus dnx4xFccZAhVlxManO2NnOa8BDqsjvNhmPt4GBtrA6mKEnzKxvCG1pnhSaIn12WimWHr XuXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P9e9tCj+; 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 m8-20020a170902f64800b001926aa9f47csi32707345plg.334.2023.01.17.13.06.17; Tue, 17 Jan 2023 13:06:23 -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=P9e9tCj+; 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 S233253AbjAQUFo (ORCPT + 47 others); Tue, 17 Jan 2023 15:05:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232550AbjAQUCi (ORCPT ); Tue, 17 Jan 2023 15:02:38 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35A6946D44; Tue, 17 Jan 2023 10:54:49 -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 ams.source.kernel.org (Postfix) with ESMTPS id DF1CCB81263; Tue, 17 Jan 2023 18:54:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEA69C433EF; Tue, 17 Jan 2023 18:54:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673981686; bh=kp5UsYKs1IV4dCBlFmKi8ZUkvTK5si51bJjpJiZUtbU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=P9e9tCj+d3Q6pIeFIhMLJQAsynNUlrMg25JsaG6CMXC4BWLvcVYsxOf4UoJh+3Zn3 EqW8jBbtEKujOC5x6nd3lYYK3MwGkyyS56PTcb/WKCiKRNxYSh5dQPS8r/SIHHaLAI Fs8ib6i/kDPvVftaMVSsfcj05fh2mUaT/asL6wWX57Po+tJ/pVS2n618jHFFKNuiJQ ldi7agz2q5l6Yp/eEJ/5lC7gzCeZzaGG6wC4BnuBHbAJ7NX2GOAAEcIr9LCFA6OZT5 AwXGGWl0OL1AfCXhuTvPCvKfZOza3GD81LWURXyxHUclDfe/c5N4svktp5mKtd+jjg NZ7R/CtQdqA9w== Date: Tue, 17 Jan 2023 10:54:44 -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: <20230117105444.7c1c1e35@kernel.org> In-Reply-To: <20230116174234.yzq6cnczs6fxww6q@skbuf> References: <20230111161706.1465242-1-vladimir.oltean@nxp.com> <20230111161706.1465242-5-vladimir.oltean@nxp.com> <20230113204336.401a2062@kernel.org> <20230114232214.tj6bsfhmhfg3zjxw@skbuf> <20230116174234.yzq6cnczs6fxww6q@skbuf> 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,UPPERCASE_50_75 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 Mon, 16 Jan 2023 19:42:34 +0200 Vladimir Oltean wrote: > The request seems to be for ETHTOOL_A_PAUSE_HEADER to use a policy like this: > > const struct nla_policy ethnl_header_policy_mac_stats[] = { > [ETHTOOL_A_HEADER_DEV_INDEX] = { .type = NLA_U32 }, > [ETHTOOL_A_HEADER_DEV_NAME] = { .type = NLA_NUL_STRING, > .len = ALTIFNAMSIZ - 1 }, > [ETHTOOL_A_HEADER_FLAGS] = NLA_POLICY_MASK(NLA_U32, > ETHTOOL_FLAGS_STATS), > + [ETHTOOL_A_HEADER_MAC_STATS_SRC] = NLA_POLICY_MASK(NLA_U32, > + ETHTOOL_MAC_STATS_SRC_PMAC), > }; > > and for ETHTOOL_A_STATS_HEADER to use a policy like this: > > const struct nla_policy ethnl_header_policy_mac_stats_src_basic[] = { > [ETHTOOL_A_HEADER_DEV_INDEX] = { .type = NLA_U32 }, > [ETHTOOL_A_HEADER_DEV_NAME] = { .type = NLA_NUL_STRING, > .len = ALTIFNAMSIZ - 1 }, > [ETHTOOL_A_HEADER_FLAGS] = NLA_POLICY_MASK(NLA_U32, > ETHTOOL_FLAGS_BASIC), > + [ETHTOOL_A_HEADER_MAC_STATS_SRC] = NLA_POLICY_MASK(NLA_U32, > + ETHTOOL_MAC_STATS_SRC_PMAC), > }; > > Did I get this right? Sorry for the delay, I was out for $national-holiday. This would be right, but it seems like you went for the other option in v3, which is also fine.