summaryrefslogtreecommitdiffstats
path: root/net/tipc/name_distr.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-05-31 13:38:02 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-09-17 22:55:10 -0400
commit9aa88c2a509e11e6efc466c88b386e0e01bef731 (patch)
treef7c42275e74229143ac9badcb78da5f3037fe118 /net/tipc/name_distr.c
parent1c553bb52eb4c58333a843c0a5888d2329909f62 (diff)
tipc: Enhance sending of bulk name table messages
Modifies the initial transfer of name table entries to a new neighboring node so that the messages are enqueued as a unit, rather than individually. The revised algorithm now locates the link carrying the message only once, and eliminates unnecessary checks for link congestion, message fragmentation, and message bundling that are not required when sending these messages. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/name_distr.c')
-rw-r--r--net/tipc/name_distr.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c
index 97546f07938..b7ca1bd7b15 100644
--- a/net/tipc/name_distr.c
+++ b/net/tipc/name_distr.c
@@ -180,6 +180,7 @@ void tipc_named_node_up(unsigned long nodearg)
struct publication *publ;
struct distr_item *item = NULL;
struct sk_buff *buf = NULL;
+ struct list_head message_list;
u32 node = (u32)nodearg;
u32 left = 0;
u32 rest;
@@ -201,6 +202,10 @@ void tipc_named_node_up(unsigned long nodearg)
if (!max_item_buf)
return;
+ /* create list of publication messages, then send them as a unit */
+
+ INIT_LIST_HEAD(&message_list);
+
read_lock_bh(&tipc_nametbl_lock);
rest = publ_cnt * ITEM_SIZE;
@@ -219,13 +224,14 @@ void tipc_named_node_up(unsigned long nodearg)
item++;
left -= ITEM_SIZE;
if (!left) {
- msg_set_link_selector(buf_msg(buf), node);
- tipc_link_send(buf, node, node);
+ list_add_tail((struct list_head *)buf, &message_list);
buf = NULL;
}
}
exit:
read_unlock_bh(&tipc_nametbl_lock);
+
+ tipc_link_send_names(&message_list, (u32)node);
}
/**