Patchwork 2.6.37 vlans on bnx2 not functional, panic with tcpdump

login
register
mail settings
Submitter Jarek Poplawski
Date Jan. 8, 2011, 6:41 p.m.
Message ID <4D28AFD1.3020808@gmail.com>
Download mbox | patch
Permalink /patch/77978/
State RFC
Delegated to: David Miller
Headers show

Comments

Jarek Poplawski - Jan. 8, 2011, 6:41 p.m.
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.
Iain Paton - Jan. 9, 2011, 11:22 a.m.
Jarek Poplawski wrote:
> 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.

No problem testing with the patch installed, however I'm now unable to duplicate the problem with a rebuilt kernel, with or without 
the patch.

The original kernel build I did still fails repeatably, but something as simple as erasing the directory, unpacking the same source 
tarball and re-compiling using the same config file gets me a working kernel.

This is somewhat troubling as there must have been some initial cause, but I'm unable to pin it down. Have spent the last day or so 
checking toolchain versions, running hardware tests on the physical build server and have come up completely empty.

I think we can safely ignore this now as it appears to be a one-off bad compile, for reasons unknown, but totally unrepeatable.

Thanks to all for your help, and apologies for the noise.

Iain
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

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