diff options
author | Octavian Purdila <octavian.purdila@intel.com> | 2014-06-11 18:36:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-11 18:38:02 -0400 |
commit | bad93e9d4eeb0d2d6b79204d6cedc7f2e7b256f1 (patch) | |
tree | 816931467196e2a89ac47919bfb2b2fc45969209 /net/nfc | |
parent | 1a0b20b257326523ec2a6cb51dd6f26ef179eb84 (diff) |
net: add __pskb_copy_fclone and pskb_copy_for_clone
There are several instances where a pskb_copy or __pskb_copy is
immediately followed by an skb_clone.
Add a couple of new functions to allow the copy skb to be allocated
from the fclone cache and thus speed up subsequent skb_clone calls.
Cc: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Marek Lindner <mareklindner@neomailbox.ch>
Cc: Simon Wunderlich <sw@simonwunderlich.de>
Cc: Antonio Quartulli <antonio@meshcoding.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: Arvid Brodin <arvid.brodin@alten.se>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Jon Maloy <jon.maloy@ericsson.com>
Cc: Allan Stephens <allan.stephens@windriver.com>
Cc: Andrew Hendry <andrew.hendry@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>
Reviewed-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/llcp_core.c | 4 | ||||
-rw-r--r-- | net/nfc/rawsock.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/net/nfc/llcp_core.c b/net/nfc/llcp_core.c index f6278da68763..51e788797317 100644 --- a/net/nfc/llcp_core.c +++ b/net/nfc/llcp_core.c | |||
@@ -680,8 +680,8 @@ void nfc_llcp_send_to_raw_sock(struct nfc_llcp_local *local, | |||
680 | continue; | 680 | continue; |
681 | 681 | ||
682 | if (skb_copy == NULL) { | 682 | if (skb_copy == NULL) { |
683 | skb_copy = __pskb_copy(skb, NFC_RAW_HEADER_SIZE, | 683 | skb_copy = __pskb_copy_fclone(skb, NFC_RAW_HEADER_SIZE, |
684 | GFP_ATOMIC); | 684 | GFP_ATOMIC, true); |
685 | 685 | ||
686 | if (skb_copy == NULL) | 686 | if (skb_copy == NULL) |
687 | continue; | 687 | continue; |
diff --git a/net/nfc/rawsock.c b/net/nfc/rawsock.c index 55eefee311eb..11c3544ea546 100644 --- a/net/nfc/rawsock.c +++ b/net/nfc/rawsock.c | |||
@@ -378,8 +378,8 @@ void nfc_send_to_raw_sock(struct nfc_dev *dev, struct sk_buff *skb, | |||
378 | 378 | ||
379 | sk_for_each(sk, &raw_sk_list.head) { | 379 | sk_for_each(sk, &raw_sk_list.head) { |
380 | if (!skb_copy) { | 380 | if (!skb_copy) { |
381 | skb_copy = __pskb_copy(skb, NFC_RAW_HEADER_SIZE, | 381 | skb_copy = __pskb_copy_fclone(skb, NFC_RAW_HEADER_SIZE, |
382 | GFP_ATOMIC); | 382 | GFP_ATOMIC, true); |
383 | if (!skb_copy) | 383 | if (!skb_copy) |
384 | continue; | 384 | continue; |
385 | 385 | ||