From: Murali Karicheri <m-karicheri2@ti.com>
To: Eric Dumazet <eric.dumazet@gmail.com>, WingMan Kwok <w-kwok2@ti.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] net: Export __netdev_alloc_frag() to allow gfp_mask flags
Date: Wed, 29 Jul 2015 16:22:41 -0400 [thread overview]
Message-ID: <55B93611.7070506@ti.com> (raw)
In-Reply-To: <1438187516.20182.95.camel@edumazet-glaptop2.roam.corp.google.com>
Eric,
On 07/29/2015 12:31 PM, Eric Dumazet wrote:
> On Wed, 2015-07-29 at 11:10 -0400, WingMan Kwok wrote:
>> This patch makes the function __netdev_alloc_frag() non-static and
>> exports it so that drivers that need to specify additional flags,
>> such as __GFP_DMA, can use it. The currently exported function,
>> netdev_alloc_frag() doesn't allow passing in gfp_mask flags.
>>
>> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
>> Signed-off-by: Reece R. Pollack <x0183204@ti.com>
>> ---
>> include/linux/skbuff.h | 1 +
>> net/core/skbuff.c | 3 ++-
>> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> You can not do this.
>
> __napi_alloc_frag() uses __alloc_page_frag() using a per cpu reserve.
>
Thanks for your response.
I assume you mean to say __netdev_alloc_frag() which is what the patch
affects. Right?
> This per cpu reserve would be shared by regular GFP_ATOMIC and your
> __GFP_DMA allocations.
I am trying to understand the issue here. Is there any issue in sharing
this per CPU reserve between DMA and ATOMIC allocations. Without this
flag, the assumption is this function can return memory which is not
DMA-able and this flag assures it is allocated from DMA zone.
Murali
>
>
>
>
>
--
Murali Karicheri
Linux Kernel, Keystone
next prev parent reply other threads:[~2015-07-29 20:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-29 15:10 [PATCH 1/2] net: Export __netdev_alloc_frag() to allow gfp_mask flags WingMan Kwok
2015-07-29 15:10 ` [PATCH 2/2] net: netcp: Allocate RX packet buffers using __GFP_DMA WingMan Kwok
2015-07-29 20:59 ` Eric Dumazet
2015-07-29 21:22 ` Murali Karicheri
2015-07-29 16:31 ` [PATCH 1/2] net: Export __netdev_alloc_frag() to allow gfp_mask flags Eric Dumazet
2015-07-29 20:22 ` Murali Karicheri [this message]
2015-07-29 20:37 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55B93611.7070506@ti.com \
--to=m-karicheri2@ti.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=w-kwok2@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).