Thread (38 messages) 38 messages, 6 authors, 2024-01-25

Re: [PATCH net-next v5 05/13] net: ethtool: Allow passing a phy index for some commands

From: Jakub Kicinski <kuba@kernel.org>
Date: 2024-01-04 23:15:18
Also in: linux-arm-kernel, lkml

On Thu, 21 Dec 2023 19:00:38 +0100 Maxime Chevallier wrote:
quoted hunk ↗ jump to hunk
@@ -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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help