lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE1zotKXQwk89QLmc-PWMO69qgUgTVmbQTbc2EzbTXCF61tyXw@mail.gmail.com>
Date:	Wed, 11 Jun 2014 12:59:26 +0300
From:	Octavian Purdila <octavian.purdila@...el.com>
To:	David Laight <David.Laight@...lab.com>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"christoph.paasch@...ouvain.be" <christoph.paasch@...ouvain.be>,
	Alexander Smirnov <alex.bluesman.smirnov@...il.com>,
	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	Marek Lindner <mareklindner@...mailbox.ch>,
	Simon Wunderlich <sw@...onwunderlich.de>,
	Antonio Quartulli <antonio@...hcoding.com>,
	Marcel Holtmann <marcel@...tmann.org>,
	Gustavo Padovan <gustavo@...ovan.org>,
	Johan Hedberg <johan.hedberg@...il.com>,
	Arvid Brodin <arvid.brodin@...en.se>,
	Patrick McHardy <kaber@...sh.net>,
	Pablo Neira Ayuso <pablo@...filter.org>,
	Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>,
	Lauro Ramos Venancio <lauro.venancio@...nbossa.org>,
	Aloisio Almeida Jr <aloisio.almeida@...nbossa.org>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Jon Maloy <jon.maloy@...csson.com>,
	Allan Stephens <allan.stephens@...driver.com>,
	Andrew Hendry <andrew.hendry@...il.com>,
	Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net-next v3] net: add skb allocation flags to pskb_copy

On Wed, Jun 11, 2014 at 12:22 PM, David Laight <David.Laight@...lab.com> wrote:
> From: Octavian Purdila
>> There are several instances where a pskb_copy or __pskb_copy is
>> immediately followed by an skb_clone. Add a new parameter to allow the
>> skb to be allocated from the fclone cache and thus speed up subsequent
>> skb_clone calls.
> ...
>> @@ -2233,9 +2233,9 @@ static inline dma_addr_t skb_frag_dma_map(struct device *dev,
>>  }
>>
>>  static inline struct sk_buff *pskb_copy(struct sk_buff *skb,
>> -                                     gfp_t gfp_mask)
>> +                                     gfp_t gfp_mask, bool fclone)
>>  {
>> -     return __pskb_copy(skb, skb_headroom(skb), gfp_mask);
>> +     return __pskb_copy(skb, skb_headroom(skb), gfp_mask, fclone);
> ...
>
> Why not add:
> static inline struct sk_buff *pskb_copy_for_clone(struct sk_buff *skb,
>                                         gfp_t gfp_mask)
> {
>         return __pskb_copy(skb, skb_headroom(skb), gfp_mask, true);
> }
>
> So that only some of the call sites need changing.
> The different function name is probably easier to grok than a Boolean
> parameter.
>

Hi David,

Since cloning a copy seems to be more frequent then one would thought,
I think that explicitly adding the option will force people to think
about allocating from the fclone cache.

But I don't care much either way, so if people think a new function is
better I will rework the patch.

Thanks,
Tavi
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ