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>
This commit is contained in:

committed by
David S. Miller

parent
9ff26e9fab
commit
7b3f522964
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user