summaryrefslogtreecommitdiffstats
path: root/net/tipc/group.c
diff options
context:
space:
mode:
authorJon Maloy <jon.maloy@ericsson.com>2017-10-13 11:04:28 +0200
committerDavid S. Miller <davem@davemloft.net>2017-10-13 08:46:00 -0700
commitee106d7f942dabce1352e01c6fe9ca4a720c2331 (patch)
tree411914c242c51f520229cb4506680be7b6c56872 /net/tipc/group.c
parent27bd9ec027f396457d1a147043c92ff22fc4c71e (diff)
downloadlinux-ee106d7f942dabce1352e01c6fe9ca4a720c2331.tar.bz2
tipc: introduce group anycast messaging
In this commit, we make it possible to send connectionless unicast messages to any member corresponding to the given member identity, when there is more than one such member. The sender must use a TIPC_ADDR_NAME address to achieve this effect. We also perform load balancing between the destinations, i.e., we primarily select one which has advertised sufficient send window to not cause a block/EAGAIN delay, if any. This mechanism is overlayed on the always present round-robin selection. Anycast messages are subject to the same start synchronization and flow control mechanism as group broadcast messages. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/group.c')
-rw-r--r--net/tipc/group.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/tipc/group.c b/net/tipc/group.c
index 18440be5b5fc..16aaaa97a005 100644
--- a/net/tipc/group.c
+++ b/net/tipc/group.c
@@ -116,6 +116,13 @@ static bool tipc_group_is_receiver(struct tipc_member *m)
return m && m->state >= MBR_JOINED;
}
+u32 tipc_group_exclude(struct tipc_group *grp)
+{
+ if (!grp->loopback)
+ return grp->portid;
+ return 0;
+}
+
int tipc_group_size(struct tipc_group *grp)
{
return grp->member_cnt;