diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2015-10-22 14:51:47 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-24 15:56:46 +0200 |
commit | c49a0a84391bcc313b3dc2a9ceee6de684e07655 (patch) | |
tree | 5f4c6686b23b073ff210628f666f1a73de8c6cd2 /net/tipc/node.c | |
parent | tipc: eliminate link's reference to owner node (diff) | |
download | linux-c49a0a84391bcc313b3dc2a9ceee6de684e07655.tar.xz linux-c49a0a84391bcc313b3dc2a9ceee6de684e07655.zip |
tipc: ensure binding table initial distribution is sent via first link
Correct synchronization of the broadcast link at first contact between
two nodes is dependent on the assumption that the binding table "bulk"
update passes via the same link as the initial broadcast syncronization
message, i.e., via the first link that is established.
This is not guaranteed in the current implementation. If two link
come up very close to each other in time, the "bulk" may quite well
pass via the second link, and hence void the guarantee of a correct
initial synchronization before the broadcast link is opened.
This commit makes two small changes to strengthen this guarantee.
1) We let the second established link occupy slot 1 of the
"active_links" array, while the first link will retain slot 0.
(This is in reality a cosmetic change, we could just as well keep
the current, opposite order)
2) We let the name distributor always use link selector/slot 0 when
it sends it binding table updates.
The extra traffic bias on the first link caused by this change should
be negligible, since binding table updates constitutes a very small
fraction of the total traffic.
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r-- | net/tipc/node.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c index eb739d20ed46..f4772f53f41a 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c @@ -370,7 +370,7 @@ static void __tipc_node_link_up(struct tipc_node *n, int bearer_id, tipc_link_set_active(ol, false); } else if (nl->priority == ol->priority) { tipc_link_set_active(nl, true); - *slot0 = bearer_id; + *slot1 = bearer_id; } else { pr_debug("New link <%s> is standby\n", nl->name); } |