netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] acenic: include NET_SKB_PAD headroom to incoming skbs
@ 2011-07-22  5:28 Eric Dumazet
  2011-07-22  6:25 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2011-07-22  5:28 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

Some workloads need some headroom (NET_SKB_PAD) to avoid expensive
reallocations.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 drivers/net/acenic.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c
index 02fcb5c..536038b 100644
--- a/drivers/net/acenic.c
+++ b/drivers/net/acenic.c
@@ -1657,7 +1657,7 @@ static void ace_load_std_rx_ring(struct ace_private *ap, int nr_bufs)
 		struct rx_desc *rd;
 		dma_addr_t mapping;
 
-		skb = alloc_skb(ACE_STD_BUFSIZE + NET_IP_ALIGN, GFP_ATOMIC);
+		skb = dev_alloc_skb(ACE_STD_BUFSIZE + NET_IP_ALIGN);
 		if (!skb)
 			break;
 
@@ -1718,7 +1718,7 @@ static void ace_load_mini_rx_ring(struct ace_private *ap, int nr_bufs)
 		struct rx_desc *rd;
 		dma_addr_t mapping;
 
-		skb = alloc_skb(ACE_MINI_BUFSIZE + NET_IP_ALIGN, GFP_ATOMIC);
+		skb = dev_alloc_skb(ACE_MINI_BUFSIZE + NET_IP_ALIGN);
 		if (!skb)
 			break;
 
@@ -1774,7 +1774,7 @@ static void ace_load_jumbo_rx_ring(struct ace_private *ap, int nr_bufs)
 		struct rx_desc *rd;
 		dma_addr_t mapping;
 
-		skb = alloc_skb(ACE_JUMBO_BUFSIZE + NET_IP_ALIGN, GFP_ATOMIC);
+		skb = dev_alloc_skb(ACE_JUMBO_BUFSIZE + NET_IP_ALIGN);
 		if (!skb)
 			break;
 



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

end of thread, other threads:[~2011-07-25 23:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-22  5:28 [PATCH] acenic: include NET_SKB_PAD headroom to incoming skbs Eric Dumazet
2011-07-22  6:25 ` David Miller
2011-07-22 16:31   ` [PATCH] acenic: use netdev_alloc_skb_ip_align Stephen Hemminger
2011-07-25 23:16     ` David Miller

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).