]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: ensure binding table initial distribution is sent via first link
authorJon Paul Maloy <jon.maloy@ericsson.com>
Thu, 22 Oct 2015 12:51:47 +0000 (08:51 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 24 Oct 2015 13:56:46 +0000 (06:56 -0700)
commit2c285190d7c7221a5fb2a890f9c8d6234570f7c9
tree5f4c6686b23b073ff210628f666f1a73de8c6cd2
parent8122d9c6a03af3f0b39de7785d426c517909145c
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>
net/tipc/name_distr.c
net/tipc/node.c