summaryrefslogtreecommitdiffstats
path: root/net/tipc/netlink.c
diff options
context:
space:
mode:
authorParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>2016-07-26 02:47:19 -0400
committerDavid S. Miller <davem@davemloft.net>2016-07-26 17:26:42 -0400
commit7b3f52296493656015f0c0deddb6e90e36b9cda2 (patch)
tree08a395cd2b131c0b64e3e96d1c9e543ff6d9dfd0 /net/tipc/netlink.c
parent9ff26e9fabaf52f28fb5e875c0b9ffc2d1512039 (diff)
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/netlink.c')
-rw-r--r--net/tipc/netlink.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/net/tipc/netlink.c b/net/tipc/netlink.c
index 56935df2167a..1e43ac0200ed 100644
--- a/net/tipc/netlink.c
+++ b/net/tipc/netlink.c
@@ -52,7 +52,8 @@ static const struct nla_policy tipc_nl_policy[TIPC_NLA_MAX + 1] = {
52 [TIPC_NLA_MEDIA] = { .type = NLA_NESTED, }, 52 [TIPC_NLA_MEDIA] = { .type = NLA_NESTED, },
53 [TIPC_NLA_NODE] = { .type = NLA_NESTED, }, 53 [TIPC_NLA_NODE] = { .type = NLA_NESTED, },
54 [TIPC_NLA_NET] = { .type = NLA_NESTED, }, 54 [TIPC_NLA_NET] = { .type = NLA_NESTED, },
55 [TIPC_NLA_NAME_TABLE] = { .type = NLA_NESTED, } 55 [TIPC_NLA_NAME_TABLE] = { .type = NLA_NESTED, },
56 [TIPC_NLA_MON] = { .type = NLA_NESTED, },
56}; 57};
57 58
58const struct nla_policy 59const struct nla_policy
@@ -61,6 +62,11 @@ tipc_nl_name_table_policy[TIPC_NLA_NAME_TABLE_MAX + 1] = {
61 [TIPC_NLA_NAME_TABLE_PUBL] = { .type = NLA_NESTED } 62 [TIPC_NLA_NAME_TABLE_PUBL] = { .type = NLA_NESTED }
62}; 63};
63 64
65const struct nla_policy tipc_nl_monitor_policy[TIPC_NLA_MON_MAX + 1] = {
66 [TIPC_NLA_MON_UNSPEC] = { .type = NLA_UNSPEC },
67 [TIPC_NLA_MON_ACTIVATION_THRESHOLD] = { .type = NLA_U32 },
68};
69
64const struct nla_policy tipc_nl_sock_policy[TIPC_NLA_SOCK_MAX + 1] = { 70const struct nla_policy tipc_nl_sock_policy[TIPC_NLA_SOCK_MAX + 1] = {
65 [TIPC_NLA_SOCK_UNSPEC] = { .type = NLA_UNSPEC }, 71 [TIPC_NLA_SOCK_UNSPEC] = { .type = NLA_UNSPEC },
66 [TIPC_NLA_SOCK_ADDR] = { .type = NLA_U32 }, 72 [TIPC_NLA_SOCK_ADDR] = { .type = NLA_U32 },
@@ -214,7 +220,12 @@ static const struct genl_ops tipc_genl_v2_ops[] = {
214 .cmd = TIPC_NL_NAME_TABLE_GET, 220 .cmd = TIPC_NL_NAME_TABLE_GET,
215 .dumpit = tipc_nl_name_table_dump, 221 .dumpit = tipc_nl_name_table_dump,
216 .policy = tipc_nl_policy, 222 .policy = tipc_nl_policy,
217 } 223 },
224 {
225 .cmd = TIPC_NL_MON_SET,
226 .doit = tipc_nl_node_set_monitor,
227 .policy = tipc_nl_policy,
228 },
218}; 229};
219 230
220int tipc_nlmsg_parse(const struct nlmsghdr *nlh, struct nlattr ***attr) 231int tipc_nlmsg_parse(const struct nlmsghdr *nlh, struct nlattr ***attr)