OSDN Git Service

tipc: support broadcast/replicast configurable for bc-link
authorHoang Le <hoang.h.le@dektech.com.au>
Tue, 19 Mar 2019 11:49:48 +0000 (18:49 +0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Mar 2019 20:56:17 +0000 (13:56 -0700)
commit02ec6cafd78c2052283516afc74c309745d20271
tree0ac38dce46fb0b4168ff09ff53e0af46d9d0c061
parent310974faccda080a5e0388d79cf6190d6aa0f1fa
tipc: support broadcast/replicast configurable for bc-link

Currently, a multicast stream uses either broadcast or replicast as
transmission method, based on the ratio between number of actual
destinations nodes and cluster size.

However, when an L2 interface (e.g., VXLAN) provides pseudo
broadcast support, this becomes very inefficient, as it blindly
replicates multicast packets to all cluster/subnet nodes,
irrespective of whether they host actual target sockets or not.

The TIPC multicast algorithm is able to distinguish real destination
nodes from other nodes, and hence provides a smarter and more
efficient method for transferring multicast messages than
pseudo broadcast can do.

Because of this, we now make it possible for users to force
the broadcast link to permanently switch to using replicast,
irrespective of which capabilities the bearer provides,
or pretend to provide.
Conversely, we also make it possible to force the broadcast link
to always use true broadcast. While maybe less useful in
deployed systems, this may at least be useful for testing the
broadcast algorithm in small clusters.

We retain the current AUTOSELECT ability, i.e., to let the broadcast link
automatically select which algorithm to use, and to switch back and forth
between broadcast and replicast as the ratio between destination
node number and cluster size changes. This remains the default method.

Furthermore, we make it possible to configure the threshold ratio for
such switches. The default ratio is now set to 10%, down from 25% in the
earlier implementation.

Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/tipc_netlink.h
net/tipc/bcast.c
net/tipc/bcast.h
net/tipc/link.c
net/tipc/netlink.c