lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87msrhn9ut.fsf@nvidia.com>
Date: Fri, 1 Mar 2024 18:22:55 +0100
From: Petr Machata <petrm@...dia.com>
To: David Ahern <dsahern@...nel.org>
CC: Petr Machata <petrm@...dia.com>, "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, "Paolo
 Abeni" <pabeni@...hat.com>, <netdev@...r.kernel.org>, Ido Schimmel
	<idosch@...dia.com>, Simon Horman <horms@...nel.org>, <mlxsw@...dia.com>,
	Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH net-next v2 7/7] net: nexthop: Expose nexthop group HW
 stats to user space


David Ahern <dsahern@...nel.org> writes:

> On 2/29/24 11:16 AM, Petr Machata wrote:
>> diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
>> index 15f108c440ae..169a003cc855 100644
>> --- a/net/ipv4/nexthop.c
>> +++ b/net/ipv4/nexthop.c
>> @@ -43,7 +43,8 @@ static const struct nla_policy rtm_nh_policy_new[] = {
>>  static const struct nla_policy rtm_nh_policy_get[] = {
>>  	[NHA_ID]		= { .type = NLA_U32 },
>>  	[NHA_OP_FLAGS]		= NLA_POLICY_MASK(NLA_U32,
>> -						  NHA_OP_FLAG_DUMP_STATS),
>> +						  NHA_OP_FLAG_DUMP_STATS |
>> +						  NHA_OP_FLAG_DUMP_HW_STATS),
>>  };
>>  
>>  static const struct nla_policy rtm_nh_policy_del[] = {
>> @@ -56,7 +57,8 @@ static const struct nla_policy rtm_nh_policy_dump[] = {
>>  	[NHA_MASTER]		= { .type = NLA_U32 },
>>  	[NHA_FDB]		= { .type = NLA_FLAG },
>>  	[NHA_OP_FLAGS]		= NLA_POLICY_MASK(NLA_U32,
>> -						  NHA_OP_FLAG_DUMP_STATS),
>> +						  NHA_OP_FLAG_DUMP_STATS |
>> +						  NHA_OP_FLAG_DUMP_HW_STATS),
>
> 2 instances of the same mask; worth giving it a name.

OK. I'll stick this somewhere above the policies:

#define NHA_OP_FLAGS_DUMP_STATS_ALL (NHA_OP_FLAG_DUMP_STATS | \
				     NHA_OP_FLAG_DUMP_HW_STATS)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ