]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: base group replicast ack counter on number of actual receivers
authorJon Maloy <jon.maloy@ericsson.com>
Thu, 21 Dec 2017 12:07:11 +0000 (13:07 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Dec 2017 18:00:04 +0000 (13:00 -0500)
commit796a676a31520fbbc8a68905d1418e7f42885f77
tree71328c48da69cb0a6bae978865f140c223905797
parent9aeb9161a7d02f2517c3116d589961996fe0fa6e
tipc: base group replicast ack counter on number of actual receivers

In commit 8a6c37210afe ("tipc: guarantee that group broadcast doesn't
bypass group unicast") we introduced a mechanism that requires the first
(replicated) broadcast sent after a unicast to be acknowledged by all
receivers before permitting sending of the next (true) broadcast.

The counter for keeping track of the number of acknowledges to expect
is based on the tipc_group::member_cnt variable. But this misses that
some of the known members may not be ready for reception, and will never
acknowledge the message, either because they haven't fully joined the
group or because they are leaving the group. Such members are identified
by not fulfilling the condition tested for in the function
tipc_group_is_enabled().

We now set the counter for the actual number of acks to receive at the
moment the message is sent, by just counting the number of recipients
satisfying the tipc_group_is_enabled() test.

Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/group.c