aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/msg.h
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2015-04-02 09:33:01 -0400
committerDavid S. Miller <davem@davemloft.net>2015-04-02 16:27:12 -0400
commitdff29b1a88524fe6afe296d6c477c491d1e02af0 (patch)
treeba0ccb87c23ba2334d52fc3fcf13d148b81376a0 /net/tipc/msg.h
parent2da7142516527a5213588f47ed302e79a5d9527a (diff)
tipc: eliminate delayed link deletion at link failover
When a bearer is disabled manually, all its links have to be reset and deleted. However, if there is a remaining, parallel link ready to take over a deleted link's traffic, we currently delay the delete of the removed link until the failover procedure is finished. This is because the remaining link needs to access state from the reset link, such as the last received packet number, and any partially reassembled buffer, in order to perform a successful failover. In this commit, we do instead move the state data over to the new link, so that it can fulfill the procedure autonomously, without accessing any data on the old link. This means that we can now proceed and delete all pertaining links immediately when a bearer is disabled. This saves us from some unnecessary complexity in such situations. We also choose to change the confusing definitions CHANGEOVER_PROTOCOL, ORIGINAL_MSG and DUPLICATE_MSG to the more descriptive TUNNEL_PROTOCOL, FAILOVER_MSG and SYNCH_MSG respectively. Reviewed-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.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index d273207ede28..e1d3595e2ee9 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -72,7 +72,7 @@ struct plist;
72#define MSG_BUNDLER 6 72#define MSG_BUNDLER 6
73#define LINK_PROTOCOL 7 73#define LINK_PROTOCOL 7
74#define CONN_MANAGER 8 74#define CONN_MANAGER 8
75#define CHANGEOVER_PROTOCOL 10 75#define TUNNEL_PROTOCOL 10
76#define NAME_DISTRIBUTOR 11 76#define NAME_DISTRIBUTOR 11
77#define MSG_FRAGMENTER 12 77#define MSG_FRAGMENTER 12
78#define LINK_CONFIG 13 78#define LINK_CONFIG 13
@@ -512,8 +512,8 @@ static inline void msg_set_nameupper(struct tipc_msg *m, u32 n)
512/* 512/*
513 * Changeover tunnel message types 513 * Changeover tunnel message types
514 */ 514 */
515#define DUPLICATE_MSG 0 515#define SYNCH_MSG 0
516#define ORIGINAL_MSG 1 516#define FAILOVER_MSG 1
517 517
518/* 518/*
519 * Config protocol message types 519 * Config protocol message types
@@ -556,9 +556,9 @@ static inline void msg_set_node_capabilities(struct tipc_msg *m, u32 n)
556 556
557static inline bool msg_dup(struct tipc_msg *m) 557static inline bool msg_dup(struct tipc_msg *m)
558{ 558{
559 if (likely(msg_user(m) != CHANGEOVER_PROTOCOL)) 559 if (likely(msg_user(m) != TUNNEL_PROTOCOL))
560 return false; 560 return false;
561 if (msg_type(m) != DUPLICATE_MSG) 561 if (msg_type(m) != SYNCH_MSG)
562 return false; 562 return false;
563 return true; 563 return true;
564} 564}