diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2016-04-15 20:33:07 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-15 23:09:06 +0300 |
commit | 34b9cd64c889d41eb990aec33fc185cab706c9b0 (patch) | |
tree | cbfa4af486b77674f2dd95a6740d205bf2d005f7 /net/tipc/link.c | |
parent | de7e07f9ee14f47d05aa43046404c2904f0247dc (diff) | |
download | linux-34b9cd64c889d41eb990aec33fc185cab706c9b0.tar.xz |
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/link.c')
-rw-r--r-- | net/tipc/link.c | 6 |
1 files changed, 3 insertions, 3 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) return released; } -/* tipc_link_build_ack_msg: prepare link acknowledge message for transmission +/* tipc_link_build_state_msg: prepare link state message for transmission * * Note that sending of broadcast ack is coordinated among nodes, to reduce * risk of ack storms towards the sender */ -int tipc_link_build_ack_msg(struct tipc_link *l, struct sk_buff_head *xmitq) +int tipc_link_build_state_msg(struct tipc_link *l, struct sk_buff_head *xmitq) { if (!l) return 0; @@ -1222,7 +1222,7 @@ int tipc_link_rcv(struct tipc_link *l, struct sk_buff *skb, if (!tipc_data_input(l, skb, l->inputq)) rc |= tipc_link_input(l, skb, l->inputq); if (unlikely(++l->rcv_unacked >= TIPC_MIN_LINK_WIN)) - rc |= tipc_link_build_ack_msg(l, xmitq); + rc |= tipc_link_build_state_msg(l, xmitq); if (unlikely(rc & ~TIPC_LINK_SND_BC_ACK)) break; } while ((skb = __skb_dequeue(defq))); |