From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: "Ed L. Cashin" <ecashin@coraid.com>,
"Ed L. Cashin" <ecashin@coraid.com>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 10/12] aoe [1/3]: support multiple AoE listeners
Date: Thu, 23 Mar 2006 22:10:54 -0800 [thread overview]
Message-ID: <1143180654720-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <1143180654198-git-send-email-gregkh@suse.de>
Always clone incoming skbs, allowing other AoE listeners
to exist in the kernel.
Signed-off-by: "Ed L. Cashin" <ecashin@coraid.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/block/aoe/aoenet.c | 22 +++++-----------------
1 files changed, 5 insertions(+), 17 deletions(-)
5dc401ee74c5d6a24867acd8302c55da9ae4f0ce
diff --git a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c
index 4be9769..fdff774 100644
--- a/drivers/block/aoe/aoenet.c
+++ b/drivers/block/aoe/aoenet.c
@@ -92,18 +92,6 @@ mac_addr(char addr[6])
return __be64_to_cpu(n);
}
-static struct sk_buff *
-skb_check(struct sk_buff *skb)
-{
- if (skb_is_nonlinear(skb))
- if ((skb = skb_share_check(skb, GFP_ATOMIC)))
- if (skb_linearize(skb, GFP_ATOMIC) < 0) {
- dev_kfree_skb(skb);
- return NULL;
- }
- return skb;
-}
-
void
aoenet_xmit(struct sk_buff *sl)
{
@@ -125,14 +113,14 @@ aoenet_rcv(struct sk_buff *skb, struct n
struct aoe_hdr *h;
u32 n;
- skb = skb_check(skb);
- if (!skb)
+ skb = skb_share_check(skb, GFP_ATOMIC);
+ if (skb == NULL)
return 0;
-
+ if (skb_is_nonlinear(skb))
+ if (skb_linearize(skb, GFP_ATOMIC) < 0)
+ goto exit;
if (!is_aoe_netif(ifp))
goto exit;
-
- //skb->len += ETH_HLEN; /* (1) */
skb_push(skb, ETH_HLEN); /* (1) */
h = (struct aoe_hdr *) skb->mac.raw;
--
1.2.4
next prev parent reply other threads:[~2006-03-24 6:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-24 6:09 [GIT PATCH] AOE patches for 2.6.16 Greg KH
2006-03-24 6:10 ` [PATCH 01/12] aoe [1/8]: zero packet data after skb allocation Greg KH
2006-03-24 6:10 ` [PATCH 02/12] aoe [2/8]: support dynamic resizing of AoE devices Greg KH
2006-03-24 6:10 ` [PATCH 03/12] aoe [3/8]: increase allowed outstanding packets Greg KH
2006-03-24 6:10 ` [PATCH 04/12] aoe [4/8]: use less confusing driver name Greg KH
2006-03-24 6:10 ` [PATCH 05/12] aoe [5/8]: allow network interface migration on packet retransmit Greg KH
2006-03-24 6:10 ` [PATCH 06/12] aoe [6/8]: update device information on last close Greg KH
2006-03-24 6:10 ` [PATCH 07/12] aoe [7/8]: update driver compatibility string Greg KH
2006-03-24 6:10 ` [PATCH 08/12] aoe [8/8]: update driver version number Greg KH
2006-03-24 6:10 ` [PATCH 09/12] aoe: do not stop retransmit timer when device goes down Greg KH
2006-03-24 6:10 ` Greg KH [this message]
2006-03-24 6:10 ` [PATCH 11/12] aoe [2/3]: don't request ATA device ID on ATA error Greg KH
2006-03-24 6:10 ` [PATCH 12/12] aoe [3/3]: update version to 22 Greg KH
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=1143180654720-git-send-email-gregkh@suse.de \
--to=gregkh@suse.de \
--cc=ecashin@coraid.com \
--cc=linux-kernel@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