diff options
author | Ying Xue <ying.xue@windriver.com> | 2014-05-07 20:54:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-09 01:41:01 -0400 |
commit | aecb9bb89cbc08366c50a98d2d4751b381a6dc3b (patch) | |
tree | d7290c509698b82d49ae68ccb292d32dd2ce5bbb /net/tipc/node.h | |
parent | 1b5d35358effb776b1ef47b26ec0df54af79d842 (diff) |
tipc: rename enum names of node flags
Rename node flags to action_flags as well as its enum names so
that they can reflect its real meanings.
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-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 | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/net/tipc/node.h b/net/tipc/node.h index 38f710fb75dc..5454edf994c3 100644 --- a/net/tipc/node.h +++ b/net/tipc/node.h | |||
@@ -47,20 +47,17 @@ | |||
47 | */ | 47 | */ |
48 | #define INVALID_NODE_SIG 0x10000 | 48 | #define INVALID_NODE_SIG 0x10000 |
49 | 49 | ||
50 | /* Flags used to block (re)establishment of contact with a neighboring node | 50 | /* Flags used to take different actions according to flag type |
51 | * TIPC_NODE_DOWN: indicate node is down and it's used to block the node's | 51 | * TIPC_WAIT_PEER_LINKS_DOWN: wait to see that peer's links are down |
52 | * links until RESET or ACTIVE message arrives | 52 | * TIPC_WAIT_OWN_LINKS_DOWN: wait until peer node is declared down |
53 | * TIPC_NODE_RESET: indicate node is reset | 53 | * TIPC_NOTIFY_NODE_DOWN: notify node is down |
54 | * TIPC_NODE_LOST: indicate node is lost and it's used to notify subscriptions | 54 | * TIPC_NOTIFY_NODE_UP: notify node is up |
55 | * when node lock is released | ||
56 | * TIPC_NODE_UP: indicate node is up and it's used to deliver local name table | ||
57 | * when node lock is released | ||
58 | */ | 55 | */ |
59 | enum { | 56 | enum { |
60 | TIPC_NODE_DOWN = (1 << 1), | 57 | TIPC_WAIT_PEER_LINKS_DOWN = (1 << 1), |
61 | TIPC_NODE_RESET = (1 << 2), | 58 | TIPC_WAIT_OWN_LINKS_DOWN = (1 << 2), |
62 | TIPC_NODE_LOST = (1 << 3), | 59 | TIPC_NOTIFY_NODE_DOWN = (1 << 3), |
63 | TIPC_NODE_UP = (1 << 4) | 60 | TIPC_NOTIFY_NODE_UP = (1 << 4) |
64 | }; | 61 | }; |
65 | 62 | ||
66 | /** | 63 | /** |
@@ -96,7 +93,7 @@ struct tipc_node_bclink { | |||
96 | * @hash: links to adjacent nodes in unsorted hash chain | 93 | * @hash: links to adjacent nodes in unsorted hash chain |
97 | * @active_links: pointers to active links to node | 94 | * @active_links: pointers to active links to node |
98 | * @links: pointers to all links to node | 95 | * @links: pointers to all links to node |
99 | * @flags: bit mask of conditions preventing link establishment to node | 96 | * @action_flags: bit mask of different types of node actions |
100 | * @bclink: broadcast-related info | 97 | * @bclink: broadcast-related info |
101 | * @list: links to adjacent nodes in sorted list of cluster's nodes | 98 | * @list: links to adjacent nodes in sorted list of cluster's nodes |
102 | * @working_links: number of working links to node (both active and standby) | 99 | * @working_links: number of working links to node (both active and standby) |
@@ -111,7 +108,7 @@ struct tipc_node { | |||
111 | struct hlist_node hash; | 108 | struct hlist_node hash; |
112 | struct tipc_link *active_links[2]; | 109 | struct tipc_link *active_links[2]; |
113 | struct tipc_link *links[MAX_BEARERS]; | 110 | struct tipc_link *links[MAX_BEARERS]; |
114 | unsigned int flags; | 111 | unsigned int action_flags; |
115 | struct tipc_node_bclink bclink; | 112 | struct tipc_node_bclink bclink; |
116 | struct list_head list; | 113 | struct list_head list; |
117 | int link_cnt; | 114 | int link_cnt; |
@@ -144,8 +141,8 @@ static inline void tipc_node_lock(struct tipc_node *node) | |||
144 | 141 | ||
145 | static inline bool tipc_node_blocked(struct tipc_node *node) | 142 | static inline bool tipc_node_blocked(struct tipc_node *node) |
146 | { | 143 | { |
147 | return (node->flags & (TIPC_NODE_DOWN | TIPC_NODE_LOST | | 144 | return (node->action_flags & (TIPC_WAIT_PEER_LINKS_DOWN | |
148 | TIPC_NODE_RESET)); | 145 | TIPC_NOTIFY_NODE_DOWN | TIPC_WAIT_OWN_LINKS_DOWN)); |
149 | } | 146 | } |
150 | 147 | ||
151 | #endif | 148 | #endif |