diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2017-02-15 06:11:06 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-02-15 06:11:06 -0800 |
| commit | 942e3aaf81dffbed4a87ed482d6e0c68d6f9bc34 (patch) | |
| tree | 6390329030fdfe1f93a95b26af44243880d80a8b /net/core/skbuff.c | |
| parent | bebd3691970485e0d783c7f2fe7bc9cb2b4ea0e3 (diff) | |
| parent | 7825e1e9298b8c89fbcdf8b5036d49ae35223d57 (diff) | |
Merge "net: support __netdev_alloc_skb to always use GFP_DMA"
Diffstat (limited to 'net/core/skbuff.c')
| -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 432de7089d0e..5dd643d524d6 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -422,6 +422,9 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev, unsigned int len, len += NET_SKB_PAD; + if (IS_ENABLED(CONFIG_FORCE_ALLOC_FROM_DMA_ZONE)) + gfp_mask |= GFP_DMA; + if ((len > SKB_WITH_OVERHEAD(PAGE_SIZE)) || (gfp_mask & (__GFP_DIRECT_RECLAIM | GFP_DMA))) { skb = __alloc_skb(len, gfp_mask, SKB_ALLOC_RX, NUMA_NO_NODE); |
