* net: Add debug info to track down GSO checksum bug
@ 2009-01-16 7:22 Herbert Xu
2009-01-19 6:08 ` David Miller
2009-01-20 0:26 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Herbert Xu @ 2009-01-16 7:22 UTC (permalink / raw)
To: David S. Miller, netdev
Hi Dave:
net: Add debug info to track down GSO checksum bug
I'm trying to track down why people're hitting the checksum warning
in skb_gso_segment. As the problem seems to be hitting lots of
people and I can't reproduce it or locate the bug, here is a patch
to print out more details which hopefully should help us to track
this down.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/net/core/dev.c b/net/core/dev.c
index b715a55..752dd11 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1534,7 +1534,19 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features)
skb->mac_len = skb->network_header - skb->mac_header;
__skb_pull(skb, skb->mac_len);
- if (WARN_ON(skb->ip_summed != CHECKSUM_PARTIAL)) {
+ if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {
+ struct net_device *dev = skb->dev;
+ struct ethtool_drvinfo info = {};
+
+ if (dev && dev->ethtool_ops && dev->ethtool_ops->get_drvinfo)
+ dev->ethtool_ops->get_drvinfo(dev, &info);
+
+ WARN(1, "%s: caps=(0x%lx, 0x%lx) len=%d data_len=%d "
+ "ip_summed=%d",
+ info.driver, dev ? dev->features : 0L,
+ skb->sk ? skb->sk->sk_route_caps : 0L,
+ skb->len, skb->data_len, skb->ip_summed);
+
if (skb_header_cloned(skb) &&
(err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
return ERR_PTR(err);
Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: net: Add debug info to track down GSO checksum bug
2009-01-16 7:22 net: Add debug info to track down GSO checksum bug Herbert Xu
@ 2009-01-19 6:08 ` David Miller
2009-01-19 11:16 ` Herbert Xu
2009-01-20 0:26 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2009-01-19 6:08 UTC (permalink / raw)
To: herbert; +Cc: netdev
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Fri, 16 Jan 2009 18:22:51 +1100
> net: Add debug info to track down GSO checksum bug
>
> I'm trying to track down why people're hitting the checksum warning
> in skb_gso_segment. As the problem seems to be hitting lots of
> people and I can't reproduce it or locate the bug, here is a patch
> to print out more details which hopefully should help us to track
> this down.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Herbert, do you still want me to add this debugging hack to
the tree?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: net: Add debug info to track down GSO checksum bug
2009-01-19 6:08 ` David Miller
@ 2009-01-19 11:16 ` Herbert Xu
0 siblings, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2009-01-19 11:16 UTC (permalink / raw)
To: David Miller; +Cc: netdev
On Sun, Jan 18, 2009 at 10:08:03PM -0800, David Miller wrote:
> From: Herbert Xu <herbert@gondor.apana.org.au>
> Date: Fri, 16 Jan 2009 18:22:51 +1100
>
> > net: Add debug info to track down GSO checksum bug
> >
> > I'm trying to track down why people're hitting the checksum warning
> > in skb_gso_segment. As the problem seems to be hitting lots of
> > people and I can't reproduce it or locate the bug, here is a patch
> > to print out more details which hopefully should help us to track
> > this down.
> >
> > Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>
> Herbert, do you still want me to add this debugging hack to
> the tree?
Yes please do unless there is a better way in finding the bug
and fixing it :)
Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: net: Add debug info to track down GSO checksum bug
2009-01-16 7:22 net: Add debug info to track down GSO checksum bug Herbert Xu
2009-01-19 6:08 ` David Miller
@ 2009-01-20 0:26 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2009-01-20 0:26 UTC (permalink / raw)
To: herbert; +Cc: netdev
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Fri, 16 Jan 2009 18:22:51 +1100
> net: Add debug info to track down GSO checksum bug
>
> I'm trying to track down why people're hitting the checksum warning
> in skb_gso_segment. As the problem seems to be hitting lots of
> people and I can't reproduce it or locate the bug, here is a patch
> to print out more details which hopefully should help us to track
> this down.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-20 0:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-16 7:22 net: Add debug info to track down GSO checksum bug Herbert Xu
2009-01-19 6:08 ` David Miller
2009-01-19 11:16 ` Herbert Xu
2009-01-20 0:26 ` David Miller
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).