diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2015-07-30 18:24:18 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-30 20:25:13 -0400 |
commit | 66996b6c47ed7f6bbb01a768e23fae262c7db8e0 (patch) | |
tree | 2567778802dedcde9c2b72430919038999512373 /net/tipc/node.h | |
parent | 655fb243b8ae5e652f744311bcb6e806e83cea1e (diff) |
tipc: extend node FSM
In the next commit, we will move link synch/failover orchestration to
the link aggregation level. In order to do this, we first need to extend
the node FSM with two more states, NODE_SYNCHING and NODE_FAILINGOVER,
plus four new events to enter and leave those states.
This commit introduces this change, without yet making use of it.
The node FSM now looks as follows:
+-----------------------------------------+
| PEER_DOWN_EVT|
| |
+------------------------+----------------+ |
|SELF_DOWN_EVT | | |
| | | |
| +-----------+ +-----------+ |
| |NODE_ | |NODE_ | |
| +----------|FAILINGOVER|<---------|SYNCHING |------------+ |
| |SELF_ +-----------+ FAILOVER_+-----------+ PEER_ | |
| |DOWN_EVT | A BEGIN_EVT A | DOWN_EVT| |
| | | | | | | |
| | | | | | | |
| | |FAILOVER_|FAILOVER_ |SYNCH_ |SYNCH_ | |
| | |END_EVT |BEGIN_EVT |BEGIN_EVT|END_EVT | |
| | | | | | | |
| | | | | | | |
| | | +--------------+ | | |
| | +------->| SELF_UP_ |<-------+ | |
| | +----------------| PEER_UP |------------------+ | |
| | |SELF_DOWN_EVT +--------------+ PEER_DOWN_EVT| | |
| | | A A | | |
| | | | | | | |
| | | PEER_UP_EVT| |SELF_UP_EVT | | |
| | | | | | | |
V V V | | V V V
+------------+ +-----------+ +-----------+ +------------+
|SELF_DOWN_ | |SELF_UP_ | |PEER_UP_ | |PEER_DOWN |
|PEER_LEAVING|<------|PEER_COMING| |SELF_COMING|------>|SELF_LEAVING|
+------------+ SELF_ +-----------+ +-----------+ PEER_ +------------+
| DOWN_EVT A A DOWN_EVT |
| | | |
| | | |
| SELF_UP_EVT| |PEER_UP_EVT |
| | | |
| | | |
|PEER_DOWN_EVT +--------------+ SELF_DOWN_EVT|
+------------------->| SELF_DOWN_ |<--------------------+
| PEER_DOWN |
+--------------+
Tested-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/node.h')
-rw-r--r-- | net/tipc/node.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/net/tipc/node.h b/net/tipc/node.h index 49df0e934a65..65e2728f66a6 100644 --- a/net/tipc/node.h +++ b/net/tipc/node.h | |||
@@ -56,13 +56,19 @@ enum { | |||
56 | SELF_UP_PEER_COMING = 0xac, | 56 | SELF_UP_PEER_COMING = 0xac, |
57 | SELF_COMING_PEER_UP = 0xca, | 57 | SELF_COMING_PEER_UP = 0xca, |
58 | SELF_LEAVING_PEER_DOWN = 0x1d, | 58 | SELF_LEAVING_PEER_DOWN = 0x1d, |
59 | NODE_FAILINGOVER = 0xf0, | ||
60 | NODE_SYNCHING = 0xcc | ||
59 | }; | 61 | }; |
60 | 62 | ||
61 | enum { | 63 | enum { |
62 | SELF_ESTABL_CONTACT_EVT = 0xec, | 64 | SELF_ESTABL_CONTACT_EVT = 0xece, |
63 | SELF_LOST_CONTACT_EVT = 0x1c, | 65 | SELF_LOST_CONTACT_EVT = 0x1ce, |
64 | PEER_ESTABL_CONTACT_EVT = 0xfec, | 66 | PEER_ESTABL_CONTACT_EVT = 0xfece, |
65 | PEER_LOST_CONTACT_EVT = 0xf1c | 67 | PEER_LOST_CONTACT_EVT = 0xf1ce, |
68 | NODE_FAILOVER_BEGIN_EVT = 0xfbe, | ||
69 | NODE_FAILOVER_END_EVT = 0xfee, | ||
70 | NODE_SYNCH_BEGIN_EVT = 0xcbe, | ||
71 | NODE_SYNCH_END_EVT = 0xcee | ||
66 | }; | 72 | }; |
67 | 73 | ||
68 | /* Flags used to take different actions according to flag type | 74 | /* Flags used to take different actions according to flag type |