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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B551FC3DA6E for ; Fri, 5 Jan 2024 08:34:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ECEwqBmW1swK8YXOgfEuEdvpf4Uc/yLeWraQTloYwcE=; b=LSV0htkJBnGf45 gBNXUvjQu7gPew0JY+fQWYLrik2xigfiVBoRet98L+qhH4npvPjr4V93Q/9MifR6jVMRbRwK7tOgJ ZDYUThy6ZYpuuAPCRnWK3D/7nT0oQoBZzlOvwpiSD3aNb9KYqqBQnu8H4+8YMKCpdys2wTixnf/U6 bDCsYag0VUEZfaHjrHFWxLsI8iR0HWeuoDMTQSNm1XAEUdvSDu+r+4YPxYycdibHySkGRPHhSxc/I EzbFOSOdS2xVIQC4bi7roQhsSPVEmX+ueQm4h4BPaY2q9mLak81Y0gGRzlk8xFHi6m1qecTuj2/2w Zg/L4m4uDX81sccjlHLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLfeZ-00GGnB-1c; Fri, 05 Jan 2024 08:34:07 +0000 Received: from relay7-d.mail.gandi.net ([2001:4b98:dc4:8::227]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLfeW-00GGm2-1g for linux-arm-kernel@lists.infradead.org; Fri, 05 Jan 2024 08:34:05 +0000 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) MIME-Version: 1.0 X-GND-Sasl: maxime.chevallier@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240105_003404_705155_C2867F2E X-CRM114-Status: GOOD ( 11.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel