mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-16 22:10:24 +00:00
net: respect GFP_DMA in __netdev_alloc_skb()
Few drivers use GFP_DMA allocations, and netdev_alloc_frag() doesn't allocate pages in DMA zone. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7ac2908e4b
commit
310e158cc3
@ -353,7 +353,7 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
|
||||
unsigned int fragsz = SKB_DATA_ALIGN(length + NET_SKB_PAD) +
|
||||
SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
|
||||
|
||||
if (fragsz <= PAGE_SIZE && !(gfp_mask & __GFP_WAIT)) {
|
||||
if (fragsz <= PAGE_SIZE && !(gfp_mask & (__GFP_WAIT | GFP_DMA))) {
|
||||
void *data = netdev_alloc_frag(fragsz);
|
||||
|
||||
if (likely(data)) {
|
||||
|
Loading…
Reference in New Issue
Block a user