aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.c
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2016-04-15 13:33:07 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-15 16:09:06 -0400
commit34b9cd64c889d41eb990aec33fc185cab706c9b0 (patch)
treecbfa4af486b77674f2dd95a6740d205bf2d005f7 /net/tipc/node.c
parentde7e07f9ee14f47d05aa43046404c2904f0247dc (diff)
tipc: let first message on link be a state message
According to the link FSM, a received traffic packet can take a link from state ESTABLISHING to ESTABLISHED, but the link can still not be fully set up in one atomic operation. This means that even if the the very first packet on the link is a traffic packet with sequence number 1 (one), it has to be dropped and retransmitted. This can be avoided if we let the mentioned packet be preceded by a LINK_PROTOCOL/STATE message, which takes up the endpoint before the arrival of the traffic. We add this small feature in this commit. This is a fully compatible change. Acked-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.c')
-rw-r--r--net/tipc/node.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index b00e12cda66c..68d9f7b8485c 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -545,6 +545,9 @@ static void __tipc_node_link_up(struct tipc_node *n, int bearer_id,
545 pr_debug("Established link <%s> on network plane %c\n", 545 pr_debug("Established link <%s> on network plane %c\n",
546 tipc_link_name(nl), tipc_link_plane(nl)); 546 tipc_link_name(nl), tipc_link_plane(nl));
547 547
548 /* Ensure that a STATE message goes first */
549 tipc_link_build_state_msg(nl, xmitq);
550
548 /* First link? => give it both slots */ 551 /* First link? => give it both slots */
549 if (!ol) { 552 if (!ol) {
550 *slot0 = bearer_id; 553 *slot0 = bearer_id;
@@ -1283,7 +1286,7 @@ static void tipc_node_bc_rcv(struct net *net, struct sk_buff *skb, int bearer_id
1283 /* Broadcast ACKs are sent on a unicast link */ 1286 /* Broadcast ACKs are sent on a unicast link */
1284 if (rc & TIPC_LINK_SND_BC_ACK) { 1287 if (rc & TIPC_LINK_SND_BC_ACK) {
1285 tipc_node_read_lock(n); 1288 tipc_node_read_lock(n);
1286 tipc_link_build_ack_msg(le->link, &xmitq); 1289 tipc_link_build_state_msg(le->link, &xmitq);
1287 tipc_node_read_unlock(n); 1290 tipc_node_read_unlock(n);
1288 } 1291 }
1289 1292