chelsio: add headroom in RX path
authorEric Dumazet <edumazet@google.com>
Wed, 20 Mar 2013 16:33:19 +0000 (09:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Mar 2013 17:29:34 +0000 (13:29 -0400)
Drivers should reserve some headroom in skb used in receive path,
to avoid future head reallocation.

One possible way to do that is to use dev_alloc_skb() instead
of alloc_skb(), so that NET_SKB_PAD bytes are reserved.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb/sge.c

index 482976925154d1dad9d18eebeda003ce1088d2db..89bef504d9dc77a004b12dc4d6f65342bb7f6ac8 100644 (file)
@@ -835,7 +835,7 @@ static void refill_free_list(struct sge *sge, struct freelQ *q)
                struct sk_buff *skb;
                dma_addr_t mapping;
 
-               skb = alloc_skb(q->rx_buffer_size, GFP_ATOMIC);
+               skb = dev_alloc_skb(q->rx_buffer_size);
                if (!skb)
                        break;