aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2015-10-22 08:51:40 -0400
committerDavid S. Miller <davem@davemloft.net>2015-10-24 06:56:35 -0700
commitfd556f209af53b9cdc45df8c467feb235376c4df (patch)
treeabca98757b551a23d08dd80ca3b72a1d3ac7a564 /net/tipc/link.c
parenttipc: let broadcast transmission use new link transmit function (diff)
downloadlinux-dev-fd556f209af53b9cdc45df8c467feb235376c4df.tar.xz
linux-dev-fd556f209af53b9cdc45df8c467feb235376c4df.zip
tipc: introduce capability bit for broadcast synchronization
Until now, we have tried to support both the newer, dedicated broadcast synchronization mechanism along with the older, less safe, RESET_MSG/ ACTIVATE_MSG based one. The latter method has turned out to be a hazard in a highly dynamic cluster, so we find it safer to disable it completely when we find that the former mechanism is supported by the peer node. For this purpose, we now introduce a new capabability bit, TIPC_BCAST_SYNCH, to inform any peer nodes that dedicated broadcast syncronization is supported by the present node. The new bit is conveyed between peers in the 'capabilities' field of neighbor discovery messages. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r--net/tipc/link.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 363da5f85704..6a1a9d9239ae 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -191,6 +191,7 @@ static u32 link_own_addr(struct tipc_link *l)
* @session: session to be used by link
* @ownnode: identity of own node
* @peer: node id of peer node
+ * @peer_caps: bitmap describing peer node capabilities
* @maddr: media address to be used
* @inputq: queue to put messages ready for delivery
* @namedq: queue to put binding table update messages ready for delivery
@@ -201,7 +202,7 @@ static u32 link_own_addr(struct tipc_link *l)
bool tipc_link_create(struct tipc_node *n, char *if_name, int bearer_id,
int tolerance, char net_plane, u32 mtu, int priority,
int window, u32 session, u32 ownnode, u32 peer,
- struct tipc_media_addr *maddr,
+ u16 peer_caps, struct tipc_media_addr *maddr,
struct sk_buff_head *inputq, struct sk_buff_head *namedq,
struct tipc_link **link)
{
@@ -226,6 +227,7 @@ bool tipc_link_create(struct tipc_node *n, char *if_name, int bearer_id,
strcpy((char *)msg_data(hdr), if_name);
l->addr = peer;
+ l->peer_caps = peer_caps;
l->media_addr = maddr;
l->owner = n;
l->peer_session = WILDCARD_SESSION;
@@ -260,6 +262,7 @@ bool tipc_link_create(struct tipc_node *n, char *if_name, int bearer_id,
* Returns true if link was created, otherwise false
*/
bool tipc_link_bc_create(struct tipc_node *n, int mtu, int window,
+ u16 peer_caps,
struct sk_buff_head *inputq,
struct sk_buff_head *namedq,
struct tipc_link **link)
@@ -267,7 +270,7 @@ bool tipc_link_bc_create(struct tipc_node *n, int mtu, int window,
struct tipc_link *l;
if (!tipc_link_create(n, "", MAX_BEARERS, 0, 'Z', mtu, 0, window,
- 0, 0, 0, NULL, inputq, namedq, link))
+ 0, 0, 0, peer_caps, NULL, inputq, namedq, link))
return false;
l = *link;