aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/bcast.c1
-rw-r--r--net/tipc/discover.c2
-rw-r--r--net/tipc/link.c7
-rw-r--r--net/tipc/link.h6
-rw-r--r--net/tipc/node.c6
-rw-r--r--net/tipc/node.h8
6 files changed, 23 insertions, 7 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 08d64e7527cb..7fdf895e7973 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -1045,6 +1045,7 @@ int tipc_bcast_init(struct net *net)
1045 if (!tipc_link_bc_create(&bb->node, 1045 if (!tipc_link_bc_create(&bb->node,
1046 MAX_PKT_DEFAULT_MCAST, 1046 MAX_PKT_DEFAULT_MCAST,
1047 BCLINK_WIN_DEFAULT, 1047 BCLINK_WIN_DEFAULT,
1048 0,
1048 &bb->inputq, 1049 &bb->inputq,
1049 &bb->namedq, 1050 &bb->namedq,
1050 &l)) 1051 &l))
diff --git a/net/tipc/discover.c b/net/tipc/discover.c
index d14e0a4aa9af..6cd36f93aeb4 100644
--- a/net/tipc/discover.c
+++ b/net/tipc/discover.c
@@ -89,7 +89,7 @@ static void tipc_disc_init_msg(struct net *net, struct sk_buff *buf, u32 type,
89 MAX_H_SIZE, dest_domain); 89 MAX_H_SIZE, dest_domain);
90 msg_set_non_seq(msg, 1); 90 msg_set_non_seq(msg, 1);
91 msg_set_node_sig(msg, tn->random); 91 msg_set_node_sig(msg, tn->random);
92 msg_set_node_capabilities(msg, 0); 92 msg_set_node_capabilities(msg, TIPC_NODE_CAPABILITIES);
93 msg_set_dest_domain(msg, dest_domain); 93 msg_set_dest_domain(msg, dest_domain);
94 msg_set_bc_netid(msg, tn->net_id); 94 msg_set_bc_netid(msg, tn->net_id);
95 b_ptr->media->addr2msg(msg_media_addr(msg), &b_ptr->addr); 95 b_ptr->media->addr2msg(msg_media_addr(msg), &b_ptr->addr);
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)
191 * @session: session to be used by link 191 * @session: session to be used by link
192 * @ownnode: identity of own node 192 * @ownnode: identity of own node
193 * @peer: node id of peer node 193 * @peer: node id of peer node
194 * @peer_caps: bitmap describing peer node capabilities
194 * @maddr: media address to be used 195 * @maddr: media address to be used
195 * @inputq: queue to put messages ready for delivery 196 * @inputq: queue to put messages ready for delivery
196 * @namedq: queue to put binding table update messages ready for delivery 197 * @namedq: queue to put binding table update messages ready for delivery
@@ -201,7 +202,7 @@ static u32 link_own_addr(struct tipc_link *l)
201bool tipc_link_create(struct tipc_node *n, char *if_name, int bearer_id, 202bool tipc_link_create(struct tipc_node *n, char *if_name, int bearer_id,
202 int tolerance, char net_plane, u32 mtu, int priority, 203 int tolerance, char net_plane, u32 mtu, int priority,
203 int window, u32 session, u32 ownnode, u32 peer, 204 int window, u32 session, u32 ownnode, u32 peer,
204 struct tipc_media_addr *maddr, 205 u16 peer_caps, struct tipc_media_addr *maddr,
205 struct sk_buff_head *inputq, struct sk_buff_head *namedq, 206 struct sk_buff_head *inputq, struct sk_buff_head *namedq,
206 struct tipc_link **link) 207 struct tipc_link **link)
207{ 208{
@@ -226,6 +227,7 @@ bool tipc_link_create(struct tipc_node *n, char *if_name, int bearer_id,
226 strcpy((char *)msg_data(hdr), if_name); 227 strcpy((char *)msg_data(hdr), if_name);
227 228
228 l->addr = peer; 229 l->addr = peer;
230 l->peer_caps = peer_caps;
229 l->media_addr = maddr; 231 l->media_addr = maddr;
230 l->owner = n; 232 l->owner = n;
231 l->peer_session = WILDCARD_SESSION; 233 l->peer_session = WILDCARD_SESSION;
@@ -260,6 +262,7 @@ bool tipc_link_create(struct tipc_node *n, char *if_name, int bearer_id,
260 * Returns true if link was created, otherwise false 262 * Returns true if link was created, otherwise false
261 */ 263 */
262bool tipc_link_bc_create(struct tipc_node *n, int mtu, int window, 264bool tipc_link_bc_create(struct tipc_node *n, int mtu, int window,
265 u16 peer_caps,
263 struct sk_buff_head *inputq, 266 struct sk_buff_head *inputq,
264 struct sk_buff_head *namedq, 267 struct sk_buff_head *namedq,
265 struct tipc_link **link) 268 struct tipc_link **link)
@@ -267,7 +270,7 @@ bool tipc_link_bc_create(struct tipc_node *n, int mtu, int window,
267 struct tipc_link *l; 270 struct tipc_link *l;
268 271
269 if (!tipc_link_create(n, "", MAX_BEARERS, 0, 'Z', mtu, 0, window, 272 if (!tipc_link_create(n, "", MAX_BEARERS, 0, 'Z', mtu, 0, window,
270 0, 0, 0, NULL, inputq, namedq, link)) 273 0, 0, 0, peer_caps, NULL, inputq, namedq, link))
271 return false; 274 return false;
272 275
273 l = *link; 276 l = *link;
diff --git a/net/tipc/link.h b/net/tipc/link.h
index 9c4acc26b3b1..d23329db4b25 100644
--- a/net/tipc/link.h
+++ b/net/tipc/link.h
@@ -119,6 +119,7 @@ struct tipc_stats {
119 * @keepalive_intv: link keepalive timer interval 119 * @keepalive_intv: link keepalive timer interval
120 * @abort_limit: # of unacknowledged continuity probes needed to reset link 120 * @abort_limit: # of unacknowledged continuity probes needed to reset link
121 * @state: current state of link FSM 121 * @state: current state of link FSM
122 * @peer_caps: bitmap describing capabilities of peer node
122 * @silent_intv_cnt: # of timer intervals without any reception from peer 123 * @silent_intv_cnt: # of timer intervals without any reception from peer
123 * @proto_msg: template for control messages generated by link 124 * @proto_msg: template for control messages generated by link
124 * @pmsg: convenience pointer to "proto_msg" field 125 * @pmsg: convenience pointer to "proto_msg" field
@@ -162,6 +163,7 @@ struct tipc_link {
162 unsigned long keepalive_intv; 163 unsigned long keepalive_intv;
163 u32 abort_limit; 164 u32 abort_limit;
164 u32 state; 165 u32 state;
166 u16 peer_caps;
165 u32 silent_intv_cnt; 167 u32 silent_intv_cnt;
166 struct { 168 struct {
167 unchar hdr[INT_H_SIZE]; 169 unchar hdr[INT_H_SIZE];
@@ -215,11 +217,11 @@ struct tipc_link {
215bool tipc_link_create(struct tipc_node *n, char *if_name, int bearer_id, 217bool tipc_link_create(struct tipc_node *n, char *if_name, int bearer_id,
216 int tolerance, char net_plane, u32 mtu, int priority, 218 int tolerance, char net_plane, u32 mtu, int priority,
217 int window, u32 session, u32 ownnode, u32 peer, 219 int window, u32 session, u32 ownnode, u32 peer,
218 struct tipc_media_addr *maddr, 220 u16 peer_caps, struct tipc_media_addr *maddr,
219 struct sk_buff_head *inputq, struct sk_buff_head *namedq, 221 struct sk_buff_head *inputq, struct sk_buff_head *namedq,
220 struct tipc_link **link); 222 struct tipc_link **link);
221bool tipc_link_bc_create(struct tipc_node *n, int mtu, int window, 223bool tipc_link_bc_create(struct tipc_node *n, int mtu, int window,
222 struct sk_buff_head *inputq, 224 u16 peer_caps, struct sk_buff_head *inputq,
223 struct sk_buff_head *namedq, 225 struct sk_buff_head *namedq,
224 struct tipc_link **link); 226 struct tipc_link **link);
225void tipc_link_tnl_prepare(struct tipc_link *l, struct tipc_link *tnl, 227void tipc_link_tnl_prepare(struct tipc_link *l, struct tipc_link *tnl,
diff --git a/net/tipc/node.c b/net/tipc/node.c
index d3f7ca202281..28bcd7be23c6 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -584,8 +584,10 @@ void tipc_node_check_dest(struct net *net, u32 onode,
584 if (!tipc_link_create(n, if_name, b->identity, b->tolerance, 584 if (!tipc_link_create(n, if_name, b->identity, b->tolerance,
585 b->net_plane, b->mtu, b->priority, 585 b->net_plane, b->mtu, b->priority,
586 b->window, mod(tipc_net(net)->random), 586 b->window, mod(tipc_net(net)->random),
587 tipc_own_addr(net), onode, &le->maddr, 587 tipc_own_addr(net), onode,
588 &le->inputq, &n->bclink.namedq, &l)) { 588 n->capabilities,
589 &le->maddr, &le->inputq,
590 &n->bclink.namedq, &l)) {
589 *respond = false; 591 *respond = false;
590 goto exit; 592 goto exit;
591 } 593 }
diff --git a/net/tipc/node.h b/net/tipc/node.h
index 344b3e7594fd..1465774ad726 100644
--- a/net/tipc/node.h
+++ b/net/tipc/node.h
@@ -62,6 +62,14 @@ enum {
62 TIPC_BCAST_RESET = (1 << 10) 62 TIPC_BCAST_RESET = (1 << 10)
63}; 63};
64 64
65/* Optional capabilities supported by this code version
66 */
67enum {
68 TIPC_BCAST_SYNCH = (1 << 1)
69};
70
71#define TIPC_NODE_CAPABILITIES TIPC_BCAST_SYNCH
72
65/** 73/**
66 * struct tipc_node_bclink - TIPC node bclink structure 74 * struct tipc_node_bclink - TIPC node bclink structure
67 * @acked: sequence # of last outbound b'cast message acknowledged by node 75 * @acked: sequence # of last outbound b'cast message acknowledged by node