netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Lo <kevlo@kevlo.org>
To: netdev@vger.kernel.org
Subject: [PATCH] 8139too: use netdev_alloc_skb
Date: Wed, 27 Aug 2008 11:35:13 +0800	[thread overview]
Message-ID: <1219808113.7135.13.camel@nsl> (raw)

[-- 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

             reply	other threads:[~2008-08-27  4:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27  3:35 Kevin Lo [this message]
2008-09-03 14:24 ` [PATCH] 8139too: use netdev_alloc_skb Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1219808113.7135.13.camel@nsl \
    --to=kevlo@kevlo.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).