Re: [PATCH net-next v2 6/7] net: nexthop: Add ability to enable / disable hardware statistics
From: David Ahern <dsahern@kernel.org>
Date: 2024-03-01 15:49:28
From: David Ahern <dsahern@kernel.org>
Date: 2024-03-01 15:49:28
On 2/29/24 11:16 AM, Petr Machata wrote:
From: Ido Schimmel <idosch@nvidia.com> Add netlink support for enabling collection of HW statistics on nexthop groups. Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Petr Machata <petrm@nvidia.com> --- include/net/nexthop.h | 2 ++ include/uapi/linux/nexthop.h | 3 +++ net/ipv4/nexthop.c | 15 ++++++++++++++- 3 files changed, 19 insertions(+), 1 deletion(-)
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. Reviewed-by: David Ahern <dsahern@kernel.org>