Subject: Re: [PATCH net-next v2 6/7] net: nexthop: Add ability to enable / disable hardware statistics

From: Petr Machata <[email-masked]>
Date: Fri, 1 Mar 2024 18:18:56 +0100

David Ahern <[email-masked]> writes:

> On 2/29/24 11:16 AM, Petr Machata wrote:
>> diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
>> index 02629ba7a75d..15f108c440ae 100644
>> --- a/net/ipv4/nexthop.c
>> +++ b/net/ipv4/nexthop.c
>> @@ -37,6 +37,7 @@ static const struct nla_policy rtm_nh_policy_new[] = {
>>  	[NHA_ENCAP]		= { .type = NLA_NESTED },
>>  	[NHA_FDB]		= { .type = NLA_FLAG },
>>  	[NHA_RES_GROUP]		= { .type = NLA_NESTED },
>> +	[NHA_HW_STATS_ENABLE]	= NLA_POLICY_MAX(NLA_U32, 1),
>
> numbers typically need a name or comment.

How about this?

	[NHA_HW_STATS_ENABLE]	= NLA_POLICY_MAX(NLA_U32, true),

Too weird maybe?