aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/link.c6
-rw-r--r--net/tipc/link.h2
-rw-r--r--net/tipc/node.c5
3 files changed, 8 insertions, 5 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 774ad3cd1f1c..2e28a7d7e802 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1107,12 +1107,12 @@ static bool tipc_link_release_pkts(struct tipc_link *l, u16 acked)
1107 return released; 1107 return released;
1108} 1108}
1109 1109
1110/* tipc_link_build_ack_msg: prepare link acknowledge message for transmission 1110/* tipc_link_build_state_msg: prepare link state message for transmission
1111 * 1111 *
1112 * Note that sending of broadcast ack is coordinated among nodes, to reduce 1112 * Note that sending of broadcast ack is coordinated among nodes, to reduce
1113 * risk of ack storms towards the sender 1113 * risk of ack storms towards the sender
1114 */ 1114 */
1115int tipc_link_build_ack_msg(struct tipc_link *l, struct sk_buff_head *xmitq) 1115int tipc_link_build_state_msg(struct tipc_link *l, struct sk_buff_head *xmitq)
1116{ 1116{
1117 if (!l) 1117 if (!l)
1118 return 0; 1118 return 0;
@@ -1222,7 +1222,7 @@ int tipc_link_rcv(struct tipc_link *l, struct sk_buff *skb,
1222 if (!tipc_data_input(l, skb, l->inputq)) 1222 if (!tipc_data_input(l, skb, l->inputq))
1223 rc |= tipc_link_input(l, skb, l->inputq); 1223 rc |= tipc_link_input(l, skb, l->inputq);
1224 if (unlikely(++l->rcv_unacked >= TIPC_MIN_LINK_WIN)) 1224 if (unlikely(++l->rcv_unacked >= TIPC_MIN_LINK_WIN))
1225 rc |= tipc_link_build_ack_msg(l, xmitq); 1225 rc |= tipc_link_build_state_msg(l, xmitq);
1226 if (unlikely(rc & ~TIPC_LINK_SND_BC_ACK)) 1226 if (unlikely(rc & ~TIPC_LINK_SND_BC_ACK))
1227 break; 1227 break;
1228 } while ((skb = __skb_dequeue(defq))); 1228 } while ((skb = __skb_dequeue(defq)));
diff --git a/net/tipc/link.h b/net/tipc/link.h
index 6a94175ee20a..d7e9d42fcb2d 100644
--- a/net/tipc/link.h
+++ b/net/tipc/link.h
@@ -123,7 +123,7 @@ int tipc_nl_parse_link_prop(struct nlattr *prop, struct nlattr *props[]);
123int tipc_link_timeout(struct tipc_link *l, struct sk_buff_head *xmitq); 123int tipc_link_timeout(struct tipc_link *l, struct sk_buff_head *xmitq);
124int tipc_link_rcv(struct tipc_link *l, struct sk_buff *skb, 124int tipc_link_rcv(struct tipc_link *l, struct sk_buff *skb,
125 struct sk_buff_head *xmitq); 125 struct sk_buff_head *xmitq);
126int tipc_link_build_ack_msg(struct tipc_link *l, struct sk_buff_head *xmitq); 126int tipc_link_build_state_msg(struct tipc_link *l, struct sk_buff_head *xmitq);
127void tipc_link_add_bc_peer(struct tipc_link *snd_l, 127void tipc_link_add_bc_peer(struct tipc_link *snd_l,
128 struct tipc_link *uc_l, 128 struct tipc_link *uc_l,
129 struct sk_buff_head *xmitq); 129 struct sk_buff_head *xmitq);
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