summaryrefslogtreecommitdiffstats
path: root/net/tipc/msg.h
diff options
context:
space:
mode:
authorJon Paul Maloy2015-07-31 00:24:19 +0200
committerDavid S. Miller2015-07-31 02:25:14 +0200
commit6e498158a827fd515b514842e9a06bdf0f75ab86 (patch)
tree0f9312078445c1bd7d2ed669c564ca6c7a330764 /net/tipc/msg.h
parenttipc: extend node FSM (diff)
downloadkernel-qcow2-linux-6e498158a827fd515b514842e9a06bdf0f75ab86.tar.gz
kernel-qcow2-linux-6e498158a827fd515b514842e9a06bdf0f75ab86.tar.xz
kernel-qcow2-linux-6e498158a827fd515b514842e9a06bdf0f75ab86.zip
tipc: move link synch and failover to link aggregation level
Link failover and synchronization have until now been handled by the links themselves, forcing them to have knowledge about and to access parallel links in order to make the two algorithms work correctly. In this commit, we move the control part of this functionality to the link aggregation level in node.c, which is the right location for this. As a result, the two algorithms become easier to follow, and the link implementation becomes simpler. 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/msg.h')
-rw-r--r--net/tipc/msg.h32
1 files changed, 11 insertions, 21 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index 234fb0531d1d..115bb2aa6bed 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -110,7 +110,6 @@ struct tipc_skb_cb {
struct sk_buff *tail;
bool validated;
bool wakeup_pending;
- bool bundling;
u16 chain_sz;
u16 chain_imp;
};
@@ -559,15 +558,6 @@ static inline void msg_set_node_capabilities(struct tipc_msg *m, u32 n)
msg_set_bits(m, 1, 15, 0x1fff, n);
}
-static inline bool msg_dup(struct tipc_msg *m)
-{
- if (likely(msg_user(m) != TUNNEL_PROTOCOL))
- return false;
- if (msg_type(m) != SYNCH_MSG)
- return false;
- return true;
-}
-
/*
* Word 2
*/
@@ -621,12 +611,12 @@ static inline void msg_set_fragm_no(struct tipc_msg *m, u32 n)
}
-static inline u32 msg_next_sent(struct tipc_msg *m)
+static inline u16 msg_next_sent(struct tipc_msg *m)
{
return msg_bits(m, 4, 0, 0xffff);
}
-static inline void msg_set_next_sent(struct tipc_msg *m, u32 n)
+static inline void msg_set_next_sent(struct tipc_msg *m, u16 n)
{
msg_set_bits(m, 4, 0, 0xffff, n);
}
@@ -727,12 +717,12 @@ static inline char *msg_media_addr(struct tipc_msg *m)
/*
* Word 9
*/
-static inline u32 msg_msgcnt(struct tipc_msg *m)
+static inline u16 msg_msgcnt(struct tipc_msg *m)
{
return msg_bits(m, 9, 16, 0xffff);
}
-static inline void msg_set_msgcnt(struct tipc_msg *m, u32 n)
+static inline void msg_set_msgcnt(struct tipc_msg *m, u16 n)
{
msg_set_bits(m, 9, 16, 0xffff, n);
}
@@ -767,19 +757,19 @@ static inline void msg_set_link_tolerance(struct tipc_msg *m, u32 n)
msg_set_bits(m, 9, 0, 0xffff, n);
}
-static inline bool msg_is_traffic(struct tipc_msg *m)
+static inline bool msg_peer_link_is_up(struct tipc_msg *m)
{
if (likely(msg_user(m) != LINK_PROTOCOL))
return true;
- if ((msg_type(m) == RESET_MSG) || (msg_type(m) == ACTIVATE_MSG))
- return false;
- return true;
+ if (msg_type(m) == STATE_MSG)
+ return true;
+ return false;
}
-static inline bool msg_peer_is_up(struct tipc_msg *m)
+static inline bool msg_peer_node_is_up(struct tipc_msg *m)
{
- if (likely(msg_is_traffic(m)))
- return false;
+ if (msg_peer_link_is_up(m))
+ return true;
return msg_redundant_link(m);
}