diff options
author | Ido Schimmel <idosch@nvidia.com> | 2021-03-11 19:03:20 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-11 16:13:00 -0800 |
commit | cfc15c1dbb0b7574498eef453b8ddb534e408551 (patch) | |
tree | 8b672cf9fcc0e9f51c8d856366f7c3af587b55f5 /include/net/nexthop.h | |
parent | 56ad5ba344dea9c914331da8754f5ba7cede9941 (diff) | |
download | linux-cfc15c1dbb0b7574498eef453b8ddb534e408551.tar.bz2 |
nexthop: Allow reporting activity of nexthop buckets
The kernel periodically checks the idle time of nexthop buckets to
determine if they are idle and can be re-populated with a new nexthop.
When the resilient nexthop group is offloaded to hardware, the kernel
will not see activity on nexthop buckets unless it is reported from
hardware.
Add a function that can be periodically called by device drivers to
report activity on nexthop buckets after querying it from the underlying
device.
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/nexthop.h')
-rw-r--r-- | include/net/nexthop.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/nexthop.h b/include/net/nexthop.h index 685f208d26b5..ba94868a21d5 100644 --- a/include/net/nexthop.h +++ b/include/net/nexthop.h @@ -222,6 +222,8 @@ int unregister_nexthop_notifier(struct net *net, struct notifier_block *nb); void nexthop_set_hw_flags(struct net *net, u32 id, bool offload, bool trap); void nexthop_bucket_set_hw_flags(struct net *net, u32 id, u16 bucket_index, bool offload, bool trap); +void nexthop_res_grp_activity_update(struct net *net, u32 id, u16 num_buckets, + unsigned long *activity); /* caller is holding rcu or rtnl; no reference taken to nexthop */ struct nexthop *nexthop_find_by_id(struct net *net, u32 id); |