diff options
| author | Liam Mark <lmark@codeaurora.org> | 2015-08-27 09:25:36 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-02-04 01:11:41 -0800 |
| commit | aa065118fbebbd590438db10f3c349932a90cfda (patch) | |
| tree | 51e1350d1b94bd2aa71cdc8dc358c0cde75f0f4d /net | |
| parent | b1c46e3dc37a95a6edcbbc5b932900a82b511822 (diff) | |
net: support __netdev_alloc_frag to always use GFP_DMA
This make it possible to ensure that any clients which use
__netdev_alloc_frag always allocate memory from the DMA zone.
Change-Id: I608939e8d460cf3e6f39748fd5c73561a051f753
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Diffstat (limited to 'net')
| -rw-r--r-- | net/core/skbuff.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 46e60923221f..7414253fe720 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -358,6 +358,9 @@ static void *__netdev_alloc_frag(unsigned int fragsz, gfp_t gfp_mask) unsigned long flags; void *data; + if (IS_ENABLED(CONFIG_FORCE_ALLOC_FROM_DMA_ZONE)) + gfp_mask |= GFP_DMA; + local_irq_save(flags); nc = this_cpu_ptr(&netdev_alloc_cache); data = __alloc_page_frag(nc, fragsz, gfp_mask); |
