aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2015-10-22 08:51:39 -0400
committerDavid S. Miller <davem@davemloft.net>2015-10-24 09:56:32 -0400
commit2f566124570625c29c3fd79bac4d9cd97c0c31a1 (patch)
treeeb1330a7984296a6f1eac0da479f6c83322691c8 /net/tipc/link.c
parentc1ab3f1dea3df566ad38caf98baf69c656679090 (diff)
tipc: let broadcast transmission use new link transmit function
This commit simplifies the broadcast link transmission function, by leveraging previous changes to the link transmission function and the broadcast transmission link life cycle. 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.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index dfc738e5cff9..363da5f85704 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -158,6 +158,21 @@ int tipc_link_is_active(struct tipc_link *l)
158 return (node_active_link(n, 0) == l) || (node_active_link(n, 1) == l); 158 return (node_active_link(n, 0) == l) || (node_active_link(n, 1) == l);
159} 159}
160 160
161void tipc_link_add_bc_peer(struct tipc_link *l)
162{
163 l->ackers++;
164}
165
166void tipc_link_remove_bc_peer(struct tipc_link *l)
167{
168 l->ackers--;
169}
170
171int tipc_link_bc_peers(struct tipc_link *l)
172{
173 return l->ackers;
174}
175
161static u32 link_own_addr(struct tipc_link *l) 176static u32 link_own_addr(struct tipc_link *l)
162{ 177{
163 return msg_prevnode(l->pmsg); 178 return msg_prevnode(l->pmsg);
@@ -258,6 +273,7 @@ bool tipc_link_bc_create(struct tipc_node *n, int mtu, int window,
258 l = *link; 273 l = *link;
259 strcpy(l->name, tipc_bclink_name); 274 strcpy(l->name, tipc_bclink_name);
260 tipc_link_reset(l); 275 tipc_link_reset(l);
276 l->ackers = 0;
261 return true; 277 return true;
262} 278}
263 279
@@ -898,8 +914,7 @@ static void link_retransmit_failure(struct tipc_link *l_ptr,
898 char addr_string[16]; 914 char addr_string[16];
899 915
900 pr_info("Msg seq number: %u, ", msg_seqno(msg)); 916 pr_info("Msg seq number: %u, ", msg_seqno(msg));
901 pr_cont("Outstanding acks: %lu\n", 917 pr_cont("Outstanding acks: %u\n", TIPC_SKB_CB(buf)->ackers);
902 (unsigned long) TIPC_SKB_CB(buf)->handle);
903 918
904 n_ptr = tipc_bclink_retransmit_to(net); 919 n_ptr = tipc_bclink_retransmit_to(net);
905 920