046ec4e8f3af9adf83468a9354bf491e36b3d44e
[openwrt/openwrt.git] / target / linux / ixp4xx / patches-4.9 / 600-skb_avoid_dmabounce.patch
1 --- a/net/core/skbuff.c
2 +++ b/net/core/skbuff.c
3 @@ -215,6 +215,9 @@ struct sk_buff *__alloc_skb(unsigned int
4
5 if (sk_memalloc_socks() && (flags & SKB_ALLOC_RX))
6 gfp_mask |= __GFP_MEMALLOC;
7 +#ifdef CONFIG_ARCH_IXP4XX
8 + gfp_mask |= GFP_DMA;
9 +#endif
10
11 /* Get the HEAD */
12 skb = kmem_cache_alloc_node(cache, gfp_mask & ~__GFP_DMA, node);
13 @@ -1224,6 +1227,10 @@ int pskb_expand_head(struct sk_buff *skb
14 if (skb_shared(skb))
15 BUG();
16
17 +#ifdef CONFIG_ARCH_IXP4XX
18 + gfp_mask |= GFP_DMA;
19 +#endif
20 +
21 size = SKB_DATA_ALIGN(size);
22
23 if (skb_pfmemalloc(skb))