Thread (23 messages) 23 messages, 4 authors, 2024-03-04

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

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(-)
quoted hunk ↗ jump to hunk
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>

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help