Merge tag 'md/4.3' of git://neil.brown.name/md
[firefly-linux-kernel-4.4.55.git] / net / tipc / node.h
index 49df0e934a65b7ebb706f93ff2ec04e01d47b9a1..344b3e7594fd0d59d8b83143181ffeac8c2df9a9 100644 (file)
 
 #define INVALID_BEARER_ID -1
 
-/* Node FSM states and events:
- */
-enum {
-       SELF_DOWN_PEER_DOWN    = 0xdd,
-       SELF_UP_PEER_UP        = 0xaa,
-       SELF_DOWN_PEER_LEAVING = 0xd1,
-       SELF_UP_PEER_COMING    = 0xac,
-       SELF_COMING_PEER_UP    = 0xca,
-       SELF_LEAVING_PEER_DOWN = 0x1d,
-};
-
-enum {
-       SELF_ESTABL_CONTACT_EVT = 0xec,
-       SELF_LOST_CONTACT_EVT   = 0x1c,
-       PEER_ESTABL_CONTACT_EVT = 0xfec,
-       PEER_LOST_CONTACT_EVT   = 0xf1c
-};
-
 /* Flags used to take different actions according to flag type
- * TIPC_WAIT_PEER_LINKS_DOWN: wait to see that peer's links are down
- * TIPC_WAIT_OWN_LINKS_DOWN: wait until peer node is declared down
  * TIPC_NOTIFY_NODE_DOWN: notify node is down
  * TIPC_NOTIFY_NODE_UP: notify node is up
  * TIPC_DISTRIBUTE_NAME: publish or withdraw link state name type
  */
 enum {
-       TIPC_MSG_EVT                    = 1,
        TIPC_NOTIFY_NODE_DOWN           = (1 << 3),
        TIPC_NOTIFY_NODE_UP             = (1 << 4),
        TIPC_WAKEUP_BCAST_USERS         = (1 << 5),
        TIPC_NOTIFY_LINK_UP             = (1 << 6),
        TIPC_NOTIFY_LINK_DOWN           = (1 << 7),
-       TIPC_NAMED_MSG_EVT              = (1 << 8),
        TIPC_BCAST_MSG_EVT              = (1 << 9),
        TIPC_BCAST_RESET                = (1 << 10)
 };
@@ -127,6 +105,8 @@ struct tipc_link_entry {
  * @links: array containing references to all links to node
  * @action_flags: bit mask of different types of node actions
  * @bclink: broadcast-related info
+ * @state: connectivity state vs peer node
+ * @sync_point: sequence number where synch/failover is finished
  * @list: links to adjacent nodes in sorted list of cluster's nodes
  * @working_links: number of working links to node (both active and standby)
  * @link_cnt: number of links to node
@@ -142,14 +122,13 @@ struct tipc_node {
        spinlock_t lock;
        struct net *net;
        struct hlist_node hash;
-       struct sk_buff_head *inputq;
-       struct sk_buff_head *namedq;
        int active_links[2];
        struct tipc_link_entry links[MAX_BEARERS];
        int action_flags;
        struct tipc_node_bclink bclink;
        struct list_head list;
        int state;
+       u16 sync_point;
        int link_cnt;
        u16 working_links;
        u16 capabilities;
@@ -164,18 +143,15 @@ struct tipc_node {
 
 struct tipc_node *tipc_node_find(struct net *net, u32 addr);
 void tipc_node_put(struct tipc_node *node);
-struct tipc_node *tipc_node_create(struct net *net, u32 addr);
 void tipc_node_stop(struct net *net);
-void tipc_node_check_dest(struct tipc_node *n, struct tipc_bearer *bearer,
-                         bool *link_up, bool *addr_match,
-                         struct tipc_media_addr *maddr);
-bool tipc_node_update_dest(struct tipc_node *n, struct tipc_bearer *bearer,
-                          struct tipc_media_addr *maddr);
+void tipc_node_check_dest(struct net *net, u32 onode,
+                         struct tipc_bearer *bearer,
+                         u16 capabilities, u32 signature,
+                         struct tipc_media_addr *maddr,
+                         bool *respond, bool *dupl_addr);
 void tipc_node_delete_links(struct net *net, int bearer_id);
 void tipc_node_attach_link(struct tipc_node *n_ptr, struct tipc_link *l_ptr);
 void tipc_node_detach_link(struct tipc_node *n_ptr, struct tipc_link *l_ptr);
-void tipc_node_link_down(struct tipc_node *n_ptr, int bearer_id);
-void tipc_node_link_up(struct tipc_node *n_ptr, int bearer_id);
 bool tipc_node_is_up(struct tipc_node *n);
 int tipc_node_get_linkname(struct net *net, u32 bearer_id, u32 node,
                           char *linkname, size_t len);