diff options
author | Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com> | 2016-07-26 08:47:19 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-26 14:26:42 -0700 |
commit | 7b3f52296493656015f0c0deddb6e90e36b9cda2 (patch) | |
tree | 08a395cd2b131c0b64e3e96d1c9e543ff6d9dfd0 /net/tipc/monitor.c | |
parent | 9ff26e9fabaf52f28fb5e875c0b9ffc2d1512039 (diff) | |
download | op-kernel-dev-7b3f52296493656015f0c0deddb6e90e36b9cda2.zip op-kernel-dev-7b3f52296493656015f0c0deddb6e90e36b9cda2.tar.gz |
tipc: make cluster size threshold for monitoring configurable
In this commit, we introduce support to configure the minimum
threshold to activate the new link monitoring algorithm.
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/monitor.c')
-rw-r--r-- | net/tipc/monitor.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/tipc/monitor.c b/net/tipc/monitor.c index 0d489e8..3892d05 100644 --- a/net/tipc/monitor.c +++ b/net/tipc/monitor.c @@ -649,3 +649,15 @@ void tipc_mon_delete(struct net *net, int bearer_id) kfree(self); kfree(mon); } + +int tipc_nl_monitor_set_threshold(struct net *net, u32 cluster_size) +{ + struct tipc_net *tn = tipc_net(net); + + if (cluster_size > TIPC_CLUSTER_SIZE) + return -EINVAL; + + tn->mon_threshold = cluster_size; + + return 0; +} |