diff options
author | Jon Maloy <jon.maloy@ericsson.com> | 2018-02-14 13:34:39 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-14 21:22:24 +0100 |
commit | 37c64cf63ba1f9c071b37a2129ae9860fd423d6c (patch) | |
tree | 9c4837a85252baa3e662757ae90f04caca2cd110 /net/tipc/bearer.c | |
parent | Merge branch 'cxgb4-speed-up-reading-on-chip-memory' (diff) | |
download | linux-37c64cf63ba1f9c071b37a2129ae9860fd423d6c.tar.xz linux-37c64cf63ba1f9c071b37a2129ae9860fd423d6c.zip |
tipc: apply bearer link tolerance on running links
Currently, the default link tolerance set in struct tipc_bearer only
has effect on links going up after that moment. I.e., a user has to
reset all the node's links across that bearer to have the new value
applied. This is too limiting and disturbing on a running cluster to
be useful.
We now change this so that also already existing links are updated
dynamically, without any need for a reset, when the bearer value is
changed. We leverage the already existing per-link functionality
for this to achieve the wanted effect.
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bearer.c')
-rw-r--r-- | net/tipc/bearer.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index c8001471da6c..83d284feab1a 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c @@ -946,11 +946,11 @@ int tipc_nl_bearer_add(struct sk_buff *skb, struct genl_info *info) int tipc_nl_bearer_set(struct sk_buff *skb, struct genl_info *info) { - int err; - char *name; struct tipc_bearer *b; struct nlattr *attrs[TIPC_NLA_BEARER_MAX + 1]; struct net *net = sock_net(skb->sk); + char *name; + int err; if (!info->attrs[TIPC_NLA_BEARER]) return -EINVAL; @@ -982,8 +982,10 @@ int tipc_nl_bearer_set(struct sk_buff *skb, struct genl_info *info) return err; } - if (props[TIPC_NLA_PROP_TOL]) + if (props[TIPC_NLA_PROP_TOL]) { b->tolerance = nla_get_u32(props[TIPC_NLA_PROP_TOL]); + tipc_node_apply_tolerance(net, b); + } if (props[TIPC_NLA_PROP_PRIO]) b->priority = nla_get_u32(props[TIPC_NLA_PROP_PRIO]); if (props[TIPC_NLA_PROP_WIN]) |