]> git.baikalelectronics.ru Git - kernel.git/commit
netdevsim: Allow reporting activity on nexthop buckets
authorIdo Schimmel <idosch@nvidia.com>
Fri, 12 Mar 2021 16:50:20 +0000 (17:50 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Mar 2021 01:44:10 +0000 (17:44 -0800)
commite6a6f59a66e620419ae675f3fbc68ed6d5e4a0aa
tree838a91637e746367b5f96e4fb0ef5fbdb7fb3e9e
parentac444d4bedc7fc8117a01f89fbb41cd9e610ff16
netdevsim: Allow reporting activity on nexthop buckets

A key component of the resilient hashing algorithm is the hash buckets'
activity. If a bucket is active, it will not be populated with a new
nexthop in order not to break existing flows. Therefore, in order to
easily and thoroughly test the algorithm, we need to be in full control
over the reported activity.

Add a debugfs interface that allows user space to have netdevsim report
a nexthop bucket within a resilient nexthop group as active. For
example:

 # echo 10 23 > /sys/kernel/debug/netdevsim/netdevsim10/fib/nexthop_bucket_activity

Will mark bucket 23 in nexthop group 10 as active.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netdevsim/fib.c