]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: stricter filtering of packets in bearer layer
authorJon Paul Maloy <jon.maloy@ericsson.com>
Thu, 7 Apr 2016 14:09:14 +0000 (10:09 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Apr 2016 21:00:13 +0000 (17:00 -0400)
commit03d4e38e189d8fabf43bd147530a02967b7a3880
tree4c48098cd2b13be2819e1e6a4918b4dced748ab1
parentc166550ca6f41840c367f46b38881bf3e8f1139b
tipc: stricter filtering of packets in bearer layer

Resetting a bearer/interface, with the consequence of resetting all its
pertaining links, is not an atomic action. This becomes particularly
evident in very large clusters, where a lot of traffic may happen on the
remaining links while we are busy shutting them down. In extreme cases,
we may even see links being re-created and re-established before we are
finished with the job.

To solve this, we now introduce a solution where we temporarily detach
the bearer from the interface when the bearer is reset. This inhibits
all packet reception, while sending still is possible. For the latter,
we use the fact that the device's user pointer now is zero to filter out
which packets can be sent during this situation; i.e., outgoing RESET
messages only.  This filtering serves to speed up the neighbors'
detection of the loss event, and saves us from unnecessary probing.

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>
net/tipc/bearer.c
net/tipc/msg.h