netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] chelsio: add headroom in RX path
@ 2013-03-20 16:33 Eric Dumazet
  2013-03-20 17:29 ` David Miller
  2013-03-20 18:30 ` [PATCH] chelsio: use netdev_alloc_skb Stephen Hemminger
  0 siblings, 2 replies; 7+ messages in thread
From: Eric Dumazet @ 2013-03-20 16:33 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

From: Eric Dumazet <edumazet@google.com>

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>
---
 drivers/net/ethernet/chelsio/cxgb/sge.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.c b/drivers/net/ethernet/chelsio/cxgb/sge.c
index 4829769..89bef50 100644
--- a/drivers/net/ethernet/chelsio/cxgb/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb/sge.c
@@ -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;
 

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-03-20 19:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-20 16:33 [PATCH] chelsio: add headroom in RX path Eric Dumazet
2013-03-20 17:29 ` David Miller
2013-03-20 18:30 ` [PATCH] chelsio: use netdev_alloc_skb Stephen Hemminger
2013-03-20 18:42   ` Eric Dumazet
2013-03-20 19:02     ` [PATCH v2] chelsio: use netdev_alloc_skb_ip_align Stephen Hemminger
2013-03-20 19:25       ` David Miller
2013-03-20 18:44   ` [PATCH] chelsio: use netdev_alloc_skb Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).