]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: ensure correct broadcast send buffer release when peer is lost
authorJon Paul Maloy <jon.maloy@ericsson.com>
Mon, 11 Jul 2016 20:08:36 +0000 (16:08 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Jul 2016 05:42:12 +0000 (22:42 -0700)
commitcd6b2cf10d8fd1ee30660cb09d5d3088e9c9c7af
tree336bff8f1042f2282dba055ed5481e50c4e8c36b
parent43e1a68d653d45ea8bd39d3df5a983e5e36763db
tipc: ensure correct broadcast send buffer release when peer is lost

After a new receiver peer has been added to the broadcast transmission
link, we allow immediate transmission of new broadcast packets, trusting
that the new peer will not accept the packets until it has received the
previously sent unicast broadcast initialiation message. In the same
way, the sender must not accept any acknowledges until it has itself
received the broadcast initialization from the peer, as well as
confirmation of the reception of its own initialization message.

Furthermore, when a receiver peer goes down, the sender has to produce
the missing acknowledges from the lost peer locally, in order ensure
correct release of the buffers that were expected to be acknowledged by
the said peer.

In a highly stressed system we have observed that contact with a peer
may come up and be lost before the above mentioned broadcast initial-
ization and confirmation have been received. This leads to the locally
produced acknowledges being rejected, and the non-acknowledged buffers
to linger in the broadcast link transmission queue until it fills up
and the link goes into permanent congestion.

In this commit, we remedy this by temporarily setting the corresponding
broadcast receive link state to ESTABLISHED and the 'bc_peer_is_up'
state to true before we issue the local acknowledges. This ensures that
those acknowledges will always be accepted. The mentioned state values
are restored immediately afterwards when the link is reset.

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>
net/tipc/link.c