On 3/10/21 8:03 AM, Petr Machata wrote:
From: Ido Schimmel <idosch@nvidia.com>
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>
Signed-off-by: Petr Machata <petrm@nvidia.com>
---
Notes:
v1 (changes since RFC):
- u32 -> u16 for bucket counts / indices
include/net/nexthop.h | 2 ++
net/ipv4/nexthop.c | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+)
Reviewed-by: David Ahern <dsahern@kernel.org>