Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp11926rdb; Fri, 5 Jan 2024 00:34:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHh0vYMA5GGIvYiVpJ7RHPMNOEbHi47g6sluxF485pv/U9I0WoGkYy5+NyqTS68mKTqr/9b X-Received: by 2002:a17:902:dacb:b0:1d3:6419:7314 with SMTP id q11-20020a170902dacb00b001d364197314mr2143287plx.74.1704443654314; Fri, 05 Jan 2024 00:34:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704443654; cv=none; d=google.com; s=arc-20160816; b=lsRpTZ7hj3+S1gwYhCMARSg6Gu4sLNrTWUUvPj8ZWx2s4DZDQB2wzo2RCOs4RyY/Hk QexQencymycrrX+Ij9TRZxmmH4WgXlD5v67ZfJJPyhFwYAnemd0IY5JUc5gAZDPuGS16 s3yMEAWL0JmLLreP2kYwXJq4GRWxKYT/CkpG88iJaiPAJUEQ9JAlhrk5ykiTCq7g9mas FtlAXPQ3lSMwFYOg3kaVT14PsetVQaePycrjDVYBgFUCI+Wwud2F4r6g97/3vUzxLV6U 2H8KxmEOAeFJSk/36UGsZ59WzZZf0IHjSSbcapj4W+zLQN7xAFo4McafsZh2QZw1gMHX p7oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=tr4AmEGv2scZUnfevs3m3o46Mdu5zJBUL4fi7MMzU58=; fh=OsPM//bQrMEF0Wcb3Eb5VSpvLEX7YsyJSTP+La8dx/M=; b=Bo4ZRqs5G0a0gNdRMULFzFsuqW6wFKWh3SobUPxh74onG4xmoZNecN/CcTlcRudzjo U62TE0yUSdAhv61BKAztDsEnURvBAhHyU1SQOpE3wUEQ5CYn0bPsCQR6Xg5nI6msP5jw d1+lV05F/JY0i6WhqAf/JE4dcW1Js8WbIjFGNwDTKPNwnSCtaf51MXZJWlTQKceFrZ7Q /eK3Z4n9xIpgsbx/7bma1NjIj2+/XXXn4H6xsRyhGItNhIhEKxXoUMbvsPs9OZ0G5v7x RojZZDYhLQVFBtXHMuaP4B83olazjD1qakqk00ZGu4qS9AbibfOhipKyEvzmyxm1zSBv e5Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Ypx9vUWd; spf=pass (google.com: domain of linux-kernel+bounces-17606-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17606-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g12-20020a170902fe0c00b001d08d0400f1si834231plj.634.2024.01.05.00.34.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 00:34:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17606-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Ypx9vUWd; spf=pass (google.com: domain of linux-kernel+bounces-17606-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17606-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id BE63B287CCB for ; Fri, 5 Jan 2024 08:34:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C08E21A18; Fri, 5 Jan 2024 08:34:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Ypx9vUWd" X-Original-To: linux-kernel@vger.kernel.org Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F5E3225A1; Fri, 5 Jan 2024 08:34:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 3891220011; Fri, 5 Jan 2024 08:33:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1704443639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tr4AmEGv2scZUnfevs3m3o46Mdu5zJBUL4fi7MMzU58=; b=Ypx9vUWdqeHKGOl/JEW5WOqXxtVXfIZGVWWf3wA1vokJB0CqmgaJ3mWL12xDTVwdOLbTc/ ClrwSqzWmM5b6Q6j3NyULA6H4YWInyc9H2zkZWrMv/jWmdGJyE1xal1/3MyNDx6KxHL/gr R1ESPb9Dd4p7oBNVgWQpvxenF5394jnvgIutvP6t5GGrSJUQRpBGPQrQMi0QOC7dq+kjvg lSY0i/Q/hi8x2UspCc3+FwwpF1kAmqHB17gkm6OZHAA0pdZ2oaS/QcRgbNRN04kk/u7ePf ec0dl6iUusB/HMGKCe+CBrakTU5BM5/Y4736GOJZB5aQ/6pDLRpWebVMcdoqRA== Date: Fri, 5 Jan 2024 10:30:45 +0100 From: Maxime Chevallier To: Jakub Kicinski Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Eric Dumazet , Paolo Abeni , Russell King , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , =?UTF-8?B?S8O2cnk=?= Maincent , Jesse Brandeburg , Jonathan Corbet , Marek =?UTF-8?B?QmVow7pu?= , Piergiorgio Beruto , Oleksij Rempel , =?UTF-8?B?Tmljb2zDsg==?= Veronese , Simon Horman Subject: Re: [PATCH net-next v5 05/13] net: ethtool: Allow passing a phy index for some commands Message-ID: <20240105103045.7b420759@device-28.home> In-Reply-To: <20240104151516.5f424dbf@kernel.org> References: <20231221180047.1924733-1-maxime.chevallier@bootlin.com> <20231221180047.1924733-6-maxime.chevallier@bootlin.com> <20240104151516.5f424dbf@kernel.org> Organization: Bootlin X-Mailer: Claws Mail 4.2.0 (GTK 3.24.39; x86_64-redhat-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-GND-Sasl: maxime.chevallier@bootlin.com Hello Jakub, On Thu, 4 Jan 2024 15:15:16 -0800 Jakub Kicinski wrote: > On Thu, 21 Dec 2023 19:00:38 +0100 Maxime Chevallier wrote: > > @@ -20,6 +21,7 @@ const struct nla_policy ethnl_header_policy[] = { > > .len = ALTIFNAMSIZ - 1 }, > > [ETHTOOL_A_HEADER_FLAGS] = NLA_POLICY_MASK(NLA_U32, > > ETHTOOL_FLAGS_BASIC), > > + [ETHTOOL_A_HEADER_PHY_INDEX] = NLA_POLICY_MIN(NLA_U32, 1), > > }; > > > > const struct nla_policy ethnl_header_policy_stats[] = { > > @@ -28,6 +30,7 @@ const struct nla_policy ethnl_header_policy_stats[] = { > > .len = ALTIFNAMSIZ - 1 }, > > [ETHTOOL_A_HEADER_FLAGS] = NLA_POLICY_MASK(NLA_U32, > > ETHTOOL_FLAGS_STATS), > > + [ETHTOOL_A_HEADER_PHY_INDEX] = NLA_POLICY_MIN(NLA_U32, 1), > > }; > > You should define (copy/paste) a new header policy and use it > only for commands which actually make use of the PHY index. > That's why we have separate copies already for stats. Ah OK I didn't know that, I'll do this. Thanks ! Maxime