netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 8139too: use netdev_alloc_skb
@ 2008-08-27  3:35 Kevin Lo
  2008-09-03 14:24 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Lo @ 2008-08-27  3:35 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/plain, Size: 191 bytes --]

Hi,

This patch uses netdev_alloc_skb. This sets skb->dev and allows 
arch specific allocation. Also cleanup the alignment code.

Tested on x86_64.

Signed-off-by:	Kevin Lo <kevlo@kevlo.org>

[-- Attachment #2: patch-8139too --]
[-- Type: text/x-patch, Size: 638 bytes --]

--- linux-2.6.27-rc4/drivers/net/8139too.c.orig	2008-08-26 16:52:59.000000000 +0800
+++ linux-2.6.27-rc4/drivers/net/8139too.c	2008-08-27 09:38:36.000000000 +0800
@@ -2009,9 +2009,9 @@ no_early_rx:
 		/* Malloc up new buffer, compatible with net-2e. */
 		/* Omit the four octet CRC from the length. */
 
-		skb = dev_alloc_skb (pkt_size + 2);
+		skb = netdev_alloc_skb(dev, pkt_size + NET_IP_ALIGN);
 		if (likely(skb)) {
-			skb_reserve (skb, 2);	/* 16 byte align the IP fields. */
+			skb_reserve (skb, NET_IP_ALIGN);	/* 16 byte align the IP fields. */
 #if RX_BUF_IDX == 3
 			wrap_copy(skb, rx_ring, ring_offset+4, pkt_size);
 #else

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

end of thread, other threads:[~2008-09-03 14:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-27  3:35 [PATCH] 8139too: use netdev_alloc_skb Kevin Lo
2008-09-03 14:24 ` Jeff Garzik

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