aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Eckelmann <sven.eckelmann@gmx.de>2010-09-05 01:58:29 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-09-05 00:29:46 -0700
commit43bfee7693f458e1ef120d2b310ef0288ab747e8 (patch)
tree16db4471b64a1384ad7297e3280f096febc2ab3a
parent99eed2842c4f67d1b9267173221441a48cd634a1 (diff)
downloadmrst-s0i3-test-43bfee7693f458e1ef120d2b310ef0288ab747e8.tar.gz
mrst-s0i3-test-43bfee7693f458e1ef120d2b310ef0288ab747e8.tar.xz
mrst-s0i3-test-43bfee7693f458e1ef120d2b310ef0288ab747e8.zip
Staging: batman-adv: Only clone skb data for multiple broadcasts
batman-adv tries to resend broadcasts on all interfaces up to three times. For each round and each interface it must provide a skb which gets consumed by the sending function. It is unnecessary to copy the data of each broadcast because the actual data is either not shared or already copied by add_bcast_packet_to_list. So it is enough to just copy the skb control data Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/batman-adv/send.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/batman-adv/send.c b/drivers/staging/batman-adv/send.c
index b39c67b3562..8dd9dd4af47 100644
--- a/drivers/staging/batman-adv/send.c
+++ b/drivers/staging/batman-adv/send.c
@@ -464,7 +464,7 @@ static void send_outstanding_bcast_packet(struct work_struct *work)
rcu_read_lock();
list_for_each_entry_rcu(batman_if, &if_list, list) {
/* send a copy of the saved skb */
- skb1 = skb_copy(forw_packet->skb, GFP_ATOMIC);
+ skb1 = skb_clone(forw_packet->skb, GFP_ATOMIC);
if (skb1)
send_skb_packet(skb1,
batman_if, broadcast_addr);