Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp8001147rdb; Thu, 4 Jan 2024 15:15:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhXHr9Fdx0MvKl5ztzIIfF3OeM2v7izZTdPC/AQ4duBp/2u80xSGocNH7o5D73ONXhZgvS X-Received: by 2002:a17:902:f945:b0:1d4:aee7:3d8d with SMTP id kx5-20020a170902f94500b001d4aee73d8dmr1370366plb.57.1704410127667; Thu, 04 Jan 2024 15:15:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704410127; cv=none; d=google.com; s=arc-20160816; b=kcBwijotWYFeX9nzJEG0N7cn83OPaAnEGUn4fNJuxANp9BZ8TVa+t1kfEXzUguqncM X6ylLYUUCRH3e2n4fu/iuPZuoYpkYBeMCggl6UgdoKgofMRMZj4R8uJlYbSePZdB1bHC DNVdRDdNyeYktyYLX8At/SKNoCjcLNbuCg+pN4xlXX3DBjFRkFm7B/eGV3kyNDaTaxB6 c5Bo370RBIH769g32WymBBIftK3UXuqCL+4PK09+PiWi91Q6HxsxBlbR2iJIchi9GBim E7iD3J+tqsCE0/GbgmYEmcoRMHBPUkzxarwSlnfssVZjSr+Lwe8e5P3lyeU9IwKqCypw 0frg== 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:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=eiE2TKfmykx81/foxCGLJoWMsu28AsRQpu/mBCPsgws=; fh=LC2oG+6w0geia0TeWcvO+8OTNxqJKljWfNfweFKsL20=; b=YvgZrSwF8KH8O8img3ntMzZIgv/kHW/HCrZBc6ZiOoNhcM/R4QoqFDymI+CHGfXhJF nnTaWyWVJPNRy5sy5vS39u2NlIadDH5dvmOY2Nls5JkkGUdzX47UurCPZGug+2JMvpgc 1eLEzaPOW36M8M3jkc1d6wmW2Eai4zf9H1uvHwngO/0f7zhk8zBvio16u2btgwKmS/LQ kIqoNK0YDUyJlANs8bkzN3gBX/MRzZXF1clY5ky5J4rFUZRP3xLErAT87Q8Q0UAteUc5 5IhiLRjE2ZoPS1DILGBQh+gnQPc3y92GZNZ7wIAwu5WYw0DzgggGYpzuvm7/+vfsoOSZ rN2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sEZCQLn0; spf=pass (google.com: domain of linux-kernel+bounces-17321-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17321-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d18-20020a639752000000b005cdfdcc946dsi300240pgo.512.2024.01.04.15.15.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 15:15:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17321-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sEZCQLn0; spf=pass (google.com: domain of linux-kernel+bounces-17321-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17321-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 3905C28320B for ; Thu, 4 Jan 2024 23:15:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E1572D041; Thu, 4 Jan 2024 23:15:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sEZCQLn0" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8FB9B2D02A; Thu, 4 Jan 2024 23:15:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31AD6C433C8; Thu, 4 Jan 2024 23:15:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704410118; bh=8+oSXyf0wqRRdg8sq1ozcCxD/jtiSJlDv+ZMldve9G0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sEZCQLn0iqKE1N3rT6Ql9/kVD9IKcrDzs7hCYNntqjHx8Cw4zDpFyFborzSnwlJhS fMHuPa1qp+wBYUKHPyz/Sm1df6gyfxra24auI87wCtfYET39jH2gHnLOZD6qNWIuh9 yuRPsROw2t+iejPRZukvyeoWWaN0RYsXer41olwjd0F9NfugfzPEoPSgzPaEv8+0V2 maBj7V4QJCx0Dy2Of+MUAjkfdiUPKsps1HoqZal0HgXqkmKTVOPppUDD0/ROpUjmKV /DoOfp9MuCEYyIhjKflgJ5CU+xZA6dNQTyLFyMguSykA4z5/3zJf9usnCyEItGf26Y hx3lWBBqE5C0g== Date: Thu, 4 Jan 2024 15:15:16 -0800 From: Jakub Kicinski To: Maxime Chevallier 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: <20240104151516.5f424dbf@kernel.org> In-Reply-To: <20231221180047.1924733-6-maxime.chevallier@bootlin.com> References: <20231221180047.1924733-1-maxime.chevallier@bootlin.com> <20231221180047.1924733-6-maxime.chevallier@bootlin.com> 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 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.