From: Erik Hugne Date: Fri, 27 Feb 2015 07:56:54 +0000 (+0100) Subject: tipc: only create header copy for name distr messages X-Git-Tag: Ubuntu-5.10.0-12.13~14989^2~389^2~4 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=3622c36f37640078c9a706b71e02e6334c85f9e9;p=mirror_ubuntu-hirsute-kernel.git 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 Reviewed-by: Jon Maloy Signed-off-by: David S. Miller --- 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) continue; if (!tipc_node_active_links(node)) continue; - oskb = skb_copy(skb, GFP_ATOMIC); + oskb = pskb_copy(skb, GFP_ATOMIC); if (!oskb) break; msg_set_destnode(buf_msg(oskb), dnode);