public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Bohac <jbohac@suse.cz>
To: "Yu, Fenghua" <fenghua.yu@intel.com>
Cc: "'Jiri Bohac'" <jbohac@suse.cz>,
	"Luck, Tony" <tony.luck@intel.com>,
	"'kenneth.w.chen@intel.com'" <kenneth.w.chen@intel.com>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	"'linux-ia64@vger.kernel.org'" <linux-ia64@vger.kernel.org>
Subject: Re: [RFC][PATCH] ia64: fix csum_ipv6_magic()
Date: Tue, 1 Sep 2009 13:35:18 +0200	[thread overview]
Message-ID: <20090901113518.GA4874@midget.suse.cz> (raw)
In-Reply-To: <A6AD88C3F2289247BE726C37303E1EB8B954B4A6@orsmsx505.amr.corp.intel.com>

On Fri, Aug 28, 2009 at 02:19:19PM -0700, Yu, Fenghua wrote:
> >I was seeing "nf_ct_icmpv6: ICMPv6 checksum failed" errors on
> >every ICMPv6 packet received. The packets did not pass the
> >netfilter checksum verification but they did pass the standard
> >verification later and got processed. This happenns with hardware
> >checksumming turned off or with adapters that do not checksum
> >ICMP packets (e.g. tg3). I tracked the problem down to the ia64
> >version of csum_ipv6_magic() introduced by 007d77d0c5.  For some
> >arguments, it gives differrent results than the generic version.
> >
> >The following patch fixes the problem for me. IA64 experts, can
> >you please have a look?
> 
> Looks good to me. Do you know the caller function for the failed csum_ipv6_magic()?

I saw the problem when csum_ipv6_magic() was called from
nf_ip6_checksum(), in the CHECKSUM_NONE branch.

The the bug is triggered by having some bits set in the high
32-bits of the register used to pass the sum parameter to
csum_ipv6_magic().

For some reason, the 
	csum_sub(skb->csum, skb_checksum(skb, 0, dataoff, 0))
in the CHECKSUM_COMPLETE branch does not seem to trigger this,
while the
	csum_sub(0, skb_checksum(skb, 0, dataoff, 0))
in the CHECKSUM_NONE branch does.

I haven't looked at the disassembly to see why, though.

-- 
Jiri Bohac <jbohac@suse.cz>
SUSE Labs, SUSE CZ


  reply	other threads:[~2009-09-01 11:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-27 21:11 [RFC][PATCH] ia64: fix csum_ipv6_magic() Jiri Bohac
2009-08-28 21:19 ` Yu, Fenghua
2009-09-01 11:35   ` Jiri Bohac [this message]
2009-09-01 23:20   ` Luck, Tony
2009-09-02  9:00     ` Jiri Bohac

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=20090901113518.GA4874@midget.suse.cz \
    --to=jbohac@suse.cz \
    --cc=fenghua.yu@intel.com \
    --cc=kenneth.w.chen@intel.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.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