aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.c
diff options
context:
space:
mode:
authorGhantaKrishnamurthy MohanKrishna <mohan.krishna.ghanta.krishnamurthy@ericsson.com>2018-04-19 05:06:20 -0400
committerDavid S. Miller <davem@davemloft.net>2018-04-20 11:04:05 -0400
commit682cd3cf946b66bace4aa1037f49f0093ff182ce (patch)
tree4c52280069d825436b0658c9a43d43c1cca80d2c /net/tipc/node.c
parent901271e0403af638c224987c2a4e55cebade7e91 (diff)
tipc: confgiure and apply UDP bearer MTU on running links
Currently, we have option to configure MTU of UDP media. The configured MTU takes effect on the links going up after that moment. I.e, a user has to reset bearer to have new value applied across its links. This is confusing and disturbing on a running cluster. We now introduce the functionality to change the default UDP bearer MTU in struct tipc_bearer. Additionally, the links are updated dynamically, without any need for a reset, when bearer value is changed. We leverage the existing per-link functionality and the design being symetrical to the confguration of link tolerance. Acked-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: GhantaKrishnamurthy MohanKrishna <mohan.krishna.ghanta.krishnamurthy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r--net/tipc/node.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index c77dd2f3c589..b71e4e376bb9 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -1681,7 +1681,8 @@ discard:
1681 kfree_skb(skb); 1681 kfree_skb(skb);
1682} 1682}
1683 1683
1684void tipc_node_apply_tolerance(struct net *net, struct tipc_bearer *b) 1684void tipc_node_apply_property(struct net *net, struct tipc_bearer *b,
1685 int prop)
1685{ 1686{
1686 struct tipc_net *tn = tipc_net(net); 1687 struct tipc_net *tn = tipc_net(net);
1687 int bearer_id = b->identity; 1688 int bearer_id = b->identity;
@@ -1696,8 +1697,13 @@ void tipc_node_apply_tolerance(struct net *net, struct tipc_bearer *b)
1696 list_for_each_entry_rcu(n, &tn->node_list, list) { 1697 list_for_each_entry_rcu(n, &tn->node_list, list) {
1697 tipc_node_write_lock(n); 1698 tipc_node_write_lock(n);
1698 e = &n->links[bearer_id]; 1699 e = &n->links[bearer_id];
1699 if (e->link) 1700 if (e->link) {
1700 tipc_link_set_tolerance(e->link, b->tolerance, &xmitq); 1701 if (prop == TIPC_NLA_PROP_TOL)
1702 tipc_link_set_tolerance(e->link, b->tolerance,
1703 &xmitq);
1704 else if (prop == TIPC_NLA_PROP_MTU)
1705 tipc_link_set_mtu(e->link, b->mtu);
1706 }
1701 tipc_node_write_unlock(n); 1707 tipc_node_write_unlock(n);
1702 tipc_bearer_xmit(net, bearer_id, &xmitq, &e->maddr); 1708 tipc_bearer_xmit(net, bearer_id, &xmitq, &e->maddr);
1703 } 1709 }