From: Stephen Hemminger <shemminger@osdl.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>
Subject: Re: sky2: hw checksum failures
Date: Tue, 5 Sep 2006 14:31:03 -0700 [thread overview]
Message-ID: <20060905143103.15842e07@localhost.localdomain> (raw)
In-Reply-To: <1157490763.22705.130.camel@localhost.localdomain>
On Wed, 06 Sep 2006 07:12:43 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> > > Which means that if it worked on x86 with le16_to_cpu, it should work on
> > > powerpc... The main difference here however is that you called
> > > le16_to_cpu (which is basically a nop) on a 32 bits field, while I
> > > called le32_to_cpu() on it. But both should lead to the same ... (x86
> > > will do a swapped 16 bits load of the 2 first bytes, while ppc will do a
> > > load of 4 bytes and swap that, thus ending up with the first 2 bytes
> > > swapped in the low order of the result). I'll dump the values and have a
> > > look to be sure. Another possibility would be a problem with the bits
> > > telling the chip where to calculate the checksum.
> > >
> > Hardware only computes 16 bit checksum.
>
> Oh I know that, but calling 16 bits swapping macros on a 32 bits field
> is a bit dodgy... might work in this case, I'll verify, but you may end
> up with the wrong half of the 32 bits word being used :)
>
> Ben.
>
>
Agreed. Actually the checksum value is same hi/lo because there are
two checksum units and we ask for the same offset on both.
--
Stephen Hemminger <shemminger@osdl.org>
next prev parent reply other threads:[~2006-09-05 21:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-05 0:36 sky2: hw checksum failures Benjamin Herrenschmidt
2006-09-05 3:34 ` Stephen Hemminger
2006-09-05 3:42 ` Benjamin Herrenschmidt
2006-09-05 3:56 ` Stephen Hemminger
2006-09-05 4:45 ` Benjamin Herrenschmidt
2006-09-05 15:00 ` Stephen Hemminger
2006-09-05 21:12 ` Benjamin Herrenschmidt
2006-09-05 21:31 ` Stephen Hemminger [this message]
2006-09-05 21:56 ` Benjamin Herrenschmidt
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=20060905143103.15842e07@localhost.localdomain \
--to=shemminger@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.