From: Stephen Hemminger <shemminger@osdl.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org
Subject: [PATCH 3/5] skge: use dev_alloc_skb
Date: Mon, 28 Aug 2006 16:19:37 -0700 [thread overview]
Message-ID: <20060828232038.303254635@localhost.localdomain> (raw)
In-Reply-To: 20060828231934.477469235@localhost.localdomain
[-- Attachment #1: skge-alloc-skb.patch --]
[-- Type: text/plain, Size: 1094 bytes --]
To avoid problems with buggy protocols that assume extra header space,
use dev_alloc_skb() when allocating receive buffers.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
--- skge-2.6.orig/drivers/net/skge.c
+++ skge-2.6/drivers/net/skge.c
@@ -827,7 +827,8 @@ static int skge_rx_fill(struct skge_port
do {
struct sk_buff *skb;
- skb = alloc_skb(skge->rx_buf_size + NET_IP_ALIGN, GFP_KERNEL);
+ skb = __dev_alloc_skb(skge->rx_buf_size + NET_IP_ALIGN,
+ GFP_KERNEL);
if (!skb)
return -ENOMEM;
@@ -2609,7 +2610,7 @@ static inline struct sk_buff *skge_rx_ge
goto error;
if (len < RX_COPY_THRESHOLD) {
- skb = alloc_skb(len + 2, GFP_ATOMIC);
+ skb = dev_alloc_skb(len + 2);
if (!skb)
goto resubmit;
@@ -2624,7 +2625,7 @@ static inline struct sk_buff *skge_rx_ge
skge_rx_reuse(e, skge->rx_buf_size);
} else {
struct sk_buff *nskb;
- nskb = alloc_skb(skge->rx_buf_size + NET_IP_ALIGN, GFP_ATOMIC);
+ nskb = dev_alloc_skb(skge->rx_buf_size + NET_IP_ALIGN);
if (!nskb)
goto resubmit;
--
Stephen Hemminger <shemminger@osdl.org>
next prev parent reply other threads:[~2006-08-28 23:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-28 23:19 [PATCH 0/5] skge update Stephen Hemminger
2006-08-28 23:19 ` [PATCH 1/5] skge: cleanup suspend/resume code Stephen Hemminger
2006-08-29 21:18 ` Jeff Garzik
2006-08-28 23:19 ` [PATCH 2/5] skge: pci bus post fixes Stephen Hemminger
2006-08-28 23:19 ` Stephen Hemminger [this message]
2006-08-29 11:23 ` [PATCH 3/5] skge: use dev_alloc_skb Christoph Hellwig
2006-08-29 20:28 ` Stephen Hemminger
2006-08-28 23:19 ` [PATCH 4/5] skge: use ethX for irq assigments Stephen Hemminger
2006-08-28 23:19 ` [PATCH 5/5] skge: version 1.7 Stephen Hemminger
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=20060828232038.303254635@localhost.localdomain \
--to=shemminger@osdl.org \
--cc=jgarzik@pobox.com \
--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).