Skip to content

Commit

Permalink
chelsio: add headroom in RX path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Mar 20, 2013
1 parent 8fdc929 commit 70386d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/chelsio/cxgb/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 70386d4

Please sign in to comment.