genode/repos/dde_linux/patches/lxip_skbuff.patch

36 lines
1007 B
Diff
Raw Normal View History

2014-11-22 14:09:18 +00:00
commit 1843c9d95c0a7f6cf04357bf26633cfd2e5bdda4
Author: Sebastian Sumpf <sebastian.sumpf@genode-labs.com>
Date: Mon Jun 2 13:34:18 2014 +0200
skbuff.patch
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -414,23 +414,9 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
2013-08-26 11:58:58 +00:00
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 | GFP_DMA))) {
- void *data;
-
2013-08-26 11:58:58 +00:00
- if (sk_memalloc_socks())
- gfp_mask |= __GFP_MEMALLOC;
-
- data = __netdev_alloc_frag(fragsz, gfp_mask);
-
- if (likely(data)) {
- skb = build_skb(data, fragsz);
- if (unlikely(!skb))
- put_page(virt_to_head_page(data));
- }
- } else {
- skb = __alloc_skb(length + NET_SKB_PAD, gfp_mask,
- SKB_ALLOC_RX, NUMA_NO_NODE);
- }
+ skb = __alloc_skb(length + NET_SKB_PAD, gfp_mask,
+ SKB_ALLOC_RX, NUMA_NO_NODE);
+
2013-08-26 11:58:58 +00:00
if (likely(skb)) {
skb_reserve(skb, NET_SKB_PAD);
skb->dev = dev;