Merge "net: support __netdev_alloc_skb to always use GFP_DMA"
This commit is contained in:
commit
942e3aaf81
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue