600-skb_avoid_dmabounce.patch 562 B

1234567891011121314151617181920212223
  1. --- a/net/core/skbuff.c
  2. +++ b/net/core/skbuff.c
  3. @@ -210,6 +210,9 @@ struct sk_buff *__alloc_skb(unsigned int
  4. if (sk_memalloc_socks() && (flags & SKB_ALLOC_RX))
  5. gfp_mask |= __GFP_MEMALLOC;
  6. +#ifdef CONFIG_ARCH_IXP4XX
  7. + gfp_mask |= GFP_DMA;
  8. +#endif
  9. /* Get the HEAD */
  10. skb = kmem_cache_alloc_node(cache, gfp_mask & ~__GFP_DMA, node);
  11. @@ -1096,6 +1099,10 @@ int pskb_expand_head(struct sk_buff *skb
  12. if (skb_shared(skb))
  13. BUG();
  14. +#ifdef CONFIG_ARCH_IXP4XX
  15. + gfp_mask |= GFP_DMA;
  16. +#endif
  17. +
  18. size = SKB_DATA_ALIGN(size);
  19. if (skb_pfmemalloc(skb))