aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2014-07-16 20:40:58 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-17 00:38:18 -0400
commitdbdf6d24ad37d63938f29a2d134a1a9f6e9e673c (patch)
tree3c2046727403ba015f699b835fc374b58093c8b4 /net/tipc/link.c
parenta9f559c37b582c9eb12f82ac9bb77476cfda6309 (diff)
tipc: make name table distributor use new send function
In a previous commit series ("tipc: new unicast transmission code") we introduced a new message sending function, tipc_link_xmit2(), and moved the unicast data users over to use that function. We now let the internal name table distributor do the same. The interaction between the name distributor and the node/link layer also becomes significantly simpler, so we can eliminate the function tipc_link_names_xmit(). Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Erik Hugne <erik.hugne@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.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index a235b245f682..367b0f5886f8 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1033,47 +1033,6 @@ static void tipc_link_sync_rcv(struct tipc_node *n, struct sk_buff *buf)
1033} 1033}
1034 1034
1035/* 1035/*
1036 * tipc_link_names_xmit - send name table entries to new neighbor
1037 *
1038 * Send routine for bulk delivery of name table messages when contact
1039 * with a new neighbor occurs. No link congestion checking is performed
1040 * because name table messages *must* be delivered. The messages must be
1041 * small enough not to require fragmentation.
1042 * Called without any locks held.
1043 */
1044void tipc_link_names_xmit(struct list_head *message_list, u32 dest)
1045{
1046 struct tipc_node *n_ptr;
1047 struct tipc_link *l_ptr;
1048 struct sk_buff *buf;
1049 struct sk_buff *temp_buf;
1050
1051 if (list_empty(message_list))
1052 return;
1053
1054 n_ptr = tipc_node_find(dest);
1055 if (n_ptr) {
1056 tipc_node_lock(n_ptr);
1057 l_ptr = n_ptr->active_links[0];
1058 if (l_ptr) {
1059 /* convert circular list to linear list */
1060 ((struct sk_buff *)message_list->prev)->next = NULL;
1061 link_add_chain_to_outqueue(l_ptr,
1062 (struct sk_buff *)message_list->next, 0);
1063 tipc_link_push_queue(l_ptr);
1064 INIT_LIST_HEAD(message_list);
1065 }
1066 tipc_node_unlock(n_ptr);
1067 }
1068
1069 /* discard the messages if they couldn't be sent */
1070 list_for_each_safe(buf, temp_buf, ((struct sk_buff *)message_list)) {
1071 list_del((struct list_head *)buf);
1072 kfree_skb(buf);
1073 }
1074}
1075
1076/*
1077 * tipc_link_push_packet: Push one unsent packet to the media 1036 * tipc_link_push_packet: Push one unsent packet to the media
1078 */ 1037 */
1079static u32 tipc_link_push_packet(struct tipc_link *l_ptr) 1038static u32 tipc_link_push_packet(struct tipc_link *l_ptr)