Subject: Re: [RFC] skge csum problems

From: Stephen Hemminger <[email-masked]>
Date: Thu, 27 Dec 2007 11:31:46 -0800

On Mon, 24 Dec 2007 19:45:23 +0000
Al Viro <[email-masked]> wrote:

> On Mon, Dec 24, 2007 at 11:36:38AM -0800, Stephen Hemminger wrote:
> > > you will get the same behaviour on big- and little-endian boxen, even though
> > > the intermediate integer values will be of course different.
> > > 
> > > skb->csum *must* be stored in the same order on l-e and b-e boxen; that
> > > way you don't need to convert it or raw data when updating the sucker [*].
> > > 
> > > [*] it's slightly more complicated since skb->csum is 4-byte, not 2-byte
> > > and the real invariant is "checksum of 4-octet array at &skb->csum must
> > > not depend on host" (so e.g XX YY 00 00 and 00 00 XX YY are equivalent -
> > > checksum doesn't change from reordering octet pairs; XX YY 00 00 and
> > > 00 00 YY XX are very definitely *NOT* equivalent; odd and even bytes
> > > can't be exchanged).
> > 
> > Did you test this on real hardware?
> 
> Test _what_ on real hardware?  That kernel expects skb->csum fixed-endian?
> That csum_add() and friends work?  Yes to both.
> 
> If you are asking whether I'd tested what skge does to csum in its rx
> descriptors when asked to byteswap - as I've said, all skge-handled stuff
> I have is on-board in little-endian boxen.  Thus asking for folks who
> could test it on big-endian and see what does that sucker actually do...

I'll wait for 2.6.25 then. I am just concerned about how real hardware
interprets the byte swap PCI flag. I'll see if I can find some cost
competitive bigendian hardware.

-- 
Stephen Hemminger <[email-masked]>