Commit 149ce37c authored by Allan Stephens's avatar Allan Stephens Committed by Paul Gortmaker
Browse files

tipc: Prevent fragmented messages during initial name table exchange

Reduces the maximum size of messages sent during the initial exchange
of name table information between two nodes to be no larger than the
MTU of the first link established between the nodes. This ensures that
messages will never need to be fragmented, which would add unnecessary
overhead to the name table synchronization mechanism.

Signed-off-by: default avatarAllan Stephens <>
Signed-off-by: default avatarPaul Gortmaker <>
parent 909234cd
...@@ -175,16 +175,32 @@ void tipc_named_withdraw(struct publication *publ) ...@@ -175,16 +175,32 @@ void tipc_named_withdraw(struct publication *publ)
void tipc_named_node_up(unsigned long node) void tipc_named_node_up(unsigned long node)
{ {
struct tipc_node *n_ptr;
struct link *l_ptr;
struct publication *publ; struct publication *publ;
struct distr_item *item = NULL; struct distr_item *item = NULL;
struct sk_buff *buf = NULL; struct sk_buff *buf = NULL;
u32 left = 0; u32 left = 0;
u32 rest; u32 rest;
u32 max_item_buf; u32 max_item_buf = 0;
/* compute maximum amount of publication data to send per message */
n_ptr = tipc_node_find((u32)node);
if (n_ptr) {
l_ptr = n_ptr->active_links[0];
if (l_ptr)
max_item_buf = ((l_ptr->max_pkt - INT_H_SIZE) /
if (!max_item_buf)
read_lock_bh(&tipc_nametbl_lock); read_lock_bh(&tipc_nametbl_lock);
max_item_buf *= ITEM_SIZE;
rest = publ_cnt * ITEM_SIZE; rest = publ_cnt * ITEM_SIZE;
list_for_each_entry(publ, &publ_root, local_list) { list_for_each_entry(publ, &publ_root, local_list) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment