aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Hugne <erik.hugne@ericsson.com>2015-02-27 02:56:54 -0500
committerDavid S. Miller <davem@davemloft.net>2015-02-27 18:18:47 -0500
commit3622c36f37640078c9a706b71e02e6334c85f9e9 (patch)
tree18d030826acf2e7ff7ed57268c67b2a3fcd6b5a7
parent247f6d0f8667fda408fbe0e503ab54a957be2ce5 (diff)
tipc: only create header copy for name distr messages
The TIPC name distributor pushes topology updates to the cluster neighbors. Currently this is done in a unicast manner, and the skb holding the update is cloned for each cluster member. This is unnecessary, as we only modify the destnode field in the header so we change it to do pskb_copy instead. Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/tipc/name_distr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c
index fcb07915aaac..506aaa565da7 100644
--- a/net/tipc/name_distr.c
+++ b/net/tipc/name_distr.c
@@ -98,7 +98,7 @@ void named_cluster_distribute(struct net *net, struct sk_buff *skb)
98 continue; 98 continue;
99 if (!tipc_node_active_links(node)) 99 if (!tipc_node_active_links(node))
100 continue; 100 continue;
101 oskb = skb_copy(skb, GFP_ATOMIC); 101 oskb = pskb_copy(skb, GFP_ATOMIC);
102 if (!oskb) 102 if (!oskb)
103 break; 103 break;
104 msg_set_destnode(buf_msg(oskb), dnode); 104 msg_set_destnode(buf_msg(oskb), dnode);