netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: netdev@vger.kernel.org
Subject: [RFC] skge csum problems
Date: Mon, 24 Dec 2007 09:43:52 +0000	[thread overview]
Message-ID: <20071224094352.GU8181@ftp.linux.org.uk> (raw)

	Both variants of skge (drivers/net and drivers/net/sk98lin/ resp.)
have the same problem with rx checksums.  They pick checksum from rx
descriptor and use it as-is.  Normally that would be the right thing to
do.  However, skge is told to byteswap descriptors on big-endian boxen.

Checksum is fixed-endian and we want it that way; IOW, what we end up
storing in skb->csum should be fixed-endian as well.  Unless the card
is smart enough to byteswap everything in rx descriptor _except_ the
checksum, we have a trouble - we get a value converted to host-endian
by the general byteswap in descriptor and we must convert it to fixed-endian
ourselves.

FWIW, FreeBSD sk_if sidesteps that mess by not telling the card to 
byteswap, so that's not too informative.  Datasheet on
http://people.freebsd.org/~wpaul/SysKonnect/xmacii_datasheet_rev_c_9-29.pdf
is not clear on what's going on with checksum in byteswapping mode either...

Could somebody with that sucker on a card (all instances I have here are
on-board ones in little-endian boxen) test what's really going on for
big-endian hosts with either driver?

             reply	other threads:[~2007-12-24  9:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-24  9:43 Al Viro [this message]
2007-12-24 13:15 ` [RFC] skge csum problems Andi Kleen
2007-12-24 18:39   ` Al Viro
2007-12-24 19:36     ` Stephen Hemminger
2007-12-24 19:45       ` Al Viro
2007-12-27 19:31         ` Stephen Hemminger

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=20071224094352.GU8181@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --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 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).