netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesse Gross <jesse@nicira.com>
To: Steve Chen <schen@mvista.com>
Cc: David Miller <davem@davemloft.net>,
	brian.haley@hp.com, usagi-users-ctl@ml.linux-ipv6.org,
	netdev@vger.kernel.org
Subject: Re: TAHI CN-6-4-1 failed on Linux 2.6.32 kernel
Date: Fri, 20 Aug 2010 13:39:03 -0400	[thread overview]
Message-ID: <AANLkTim9oDnu-eC31f1vE18Dd6JXMtTcxnd=ULDjAOh4@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimSishHmLTQ9RF8zMq_eOBQ+HiBroKoygFS27-x@mail.gmail.com>

On Fri, Aug 20, 2010 at 1:16 PM, Steve Chen <schen@mvista.com> wrote:
>
> On Thu, Aug 19, 2010 at 7:06 PM, David Miller <davem@davemloft.net> wrote:
> > From: Steve Chen <schen@mvista.com>
> > Date: Thu, 19 Aug 2010 13:35:14 -0500
> >
> >> I trace through the code.  It appears that the network driver (e1000e
> >> for my setup) always set ip_summed to CHECKSUM_UNNECESSARY.  I have
> >> been unsuccessful to get the driver to take the other branch where
> >> ip_summed is set to CHECKSUM_COMPLETE.  Even when I hard code
> >> ip_summed to CHECKSUM_COMPLETE, __skb_checksum_complete_head set
> >> ip_summed to CHECKSUM_UNNECESSARY after recomputing the checksum.
> >>
> >> So far the only way I'm able to get ICMP to recompute checksum is
> >> through the attached hack.  Even though I can get all the tests to
> >> pass, but it just seem wrong.
> >
> > If turning off hardware RX checksumming with ethtool has no effect,
> > and the problem is seen with multiple ethernet cards, the problem
> > is elsewhere.
> >
> > First of all, if you turn RX checksumming off, the checksum field
> > of the SKB should always be skb->ip_summed = 0.  If this is not
> > happening, find out why.
>
> Ahhh, thats my problem.  I incorrectly thought the ip_summed should be
> 2.  The ip_summed is set to 1 in
> __skb_checksum_complete_head.  Looking at the code, shouldn't
>
> if (likely(!sum))
>
> be
>
> if (likely(sum))
>
> Since sum == 0 would indicate an error?

sum == 0 indicates that the checksum is correct.

If you compute the checksum of a packet containing the correct
checksum the result is 0.  It's like a slightly more complicated
varient of a parity bit.

  reply	other threads:[~2010-08-20 17:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29  3:20 TAHI CN-6-4-1 failed on Linux 2.6.32 kernel Steve Chen
2010-08-12 21:10 ` Brian Haley
2010-08-12 23:04   ` Steve Chen
2010-08-13  0:00     ` Steve Chen
2010-08-13  2:23     ` Brian Haley
2010-08-13 17:34       ` Steve Chen
2010-08-13 17:55         ` Brian Haley
2010-08-13 22:25           ` Steve Chen
2010-08-16 14:07             ` Steve Chen
2010-08-19 18:35               ` Steve Chen
2010-08-20  0:06                 ` David Miller
2010-08-20 17:16                   ` Steve Chen
2010-08-20 17:39                     ` Jesse Gross [this message]
     [not found]                     ` <AANLkTi=T_=Dy8EhOOyevLd4yj1cy2P8ytXUPS=Y-d6hK@mail.gmail.com>
2010-08-21  4:16                       ` Steve Chen

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='AANLkTim9oDnu-eC31f1vE18Dd6JXMtTcxnd=ULDjAOh4@mail.gmail.com' \
    --to=jesse@nicira.com \
    --cc=brian.haley@hp.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=schen@mvista.com \
    --cc=usagi-users-ctl@ml.linux-ipv6.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).