netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@gmail.com>
To: Iain Paton <selsinork@gmail.com>
Cc: Michael Chan <mchan@broadcom.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.37 vlans on bnx2 not functional, panic with tcpdump
Date: Sat, 08 Jan 2011 19:41:21 +0100	[thread overview]
Message-ID: <4D28AFD1.3020808@gmail.com> (raw)
In-Reply-To: <4D2754F9.8050707@gmail.com>

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

Iain Paton wrote:
...
> So you can consider any bnx2 cause for this closed. I'll get back to the
> list if I can come up with any more useful info.

Hi Iain,
If it's not a problem, please try if the attached debugging patch
(not tested) can change anything.

Thanks,
Jarek P.

[-- Attachment #2: dev.c.deliver_skb.1.diff --]
[-- Type: text/plain, Size: 1286 bytes --]

diff --git a/net/core/dev.c b/net/core/dev.c
index 0dd54a6..9244373 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2720,6 +2720,17 @@ static inline int deliver_skb(struct sk_buff *skb,
 	return pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
 }
 
+static inline int deliver_skb_clone(struct sk_buff *skb,
+			      struct packet_type *pt_prev,
+			      struct net_device *orig_dev)
+{
+	struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC);
+
+	if (!nskb)
+		return 0;
+	return pt_prev->func(nskb, nskb->dev, pt_prev, orig_dev);
+}
+
 #if (defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)) && \
     (defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE))
 /* This hook is defined here for ATM LANE */
@@ -2950,7 +2961,7 @@ static int __netif_receive_skb(struct sk_buff *skb)
 		if (ptype->dev == null_or_orig || ptype->dev == skb->dev ||
 		    ptype->dev == orig_dev) {
 			if (pt_prev)
-				ret = deliver_skb(skb, pt_prev, orig_dev);
+				ret = deliver_skb_clone(skb, pt_prev, orig_dev);
 			pt_prev = ptype;
 		}
 	}
@@ -2976,7 +2987,7 @@ ncls:
 
 	if (vlan_tx_tag_present(skb)) {
 		if (pt_prev) {
-			ret = deliver_skb(skb, pt_prev, orig_dev);
+			ret = deliver_skb_clone(skb, pt_prev, orig_dev);
 			pt_prev = NULL;
 		}
 		if (vlan_hwaccel_do_receive(&skb)) {

  reply	other threads:[~2011-01-08 18:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-06 21:32 2.6.37 vlans on bnx2 not functional, panic with tcpdump Iain Paton
2011-01-06 23:52 ` Michael Chan
2011-01-07  0:46   ` Michael Chan
2011-01-07  9:03     ` selsinork
     [not found]     ` <AANLkTi=PGPVRbS3XViskpZ0GSS8ouBcgVZYYG9EoM-Nz@mail.gmail.com>
2011-01-07 17:50       ` Michael Chan
2011-01-07 18:01         ` Iain Paton
2011-01-08 18:41           ` Jarek Poplawski [this message]
2011-01-09 11:22             ` Iain Paton

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=4D28AFD1.3020808@gmail.com \
    --to=jarkao2@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=selsinork@gmail.com \
    /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).