From: Al Viro <viro@ftp.linux.org.uk>
To: David Miller <davem@davemloft.net>,
kenneth.w.chen@intel.com, akpm@osdl.org, jgarzik@pobox.com,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [patch] fix up generic csum_ipv6_magic function prototype
Date: Mon, 13 Nov 2006 09:25:15 +0000 [thread overview]
Message-ID: <20061113092515.GS29920@ftp.linux.org.uk> (raw)
In-Reply-To: <20061113091222.GA26628@flint.arm.linux.org.uk>
On Mon, Nov 13, 2006 at 09:12:22AM +0000, Russell King wrote:
> On Mon, Nov 13, 2006 at 08:52:23AM +0000, Al Viro wrote:
> > After doing the above we have the following:
> >
> > Platform-dependent:
> > __wsum csum_tcpudp_nofold(__be32, __be32, T1, T2, __wsum);
> > On arm/arm26: T1 = unsigned short, T2 = unsigned int.
> > __sum16 csum_tcpudp_magic(__be32, __be32, unsigned short, T, __wsum);
> > On arm/arm26 T is unsigned int, elsewhere it's unsigned short.
>
> Could both become unsigned short or unsigned int. Would prefer
> unsigned int on ARM, since otherwise the compiler generate code to
> truncate any variable "int"s to an unsigned short.
Frankly, as for the generated code... I'd expect s/htons(len)/len * 256/
and the same for proto in there to have much more effect. And it does give
the same checksum...
next prev parent reply other threads:[~2006-11-13 9:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-09 2:02 [patch] fix up generic csum_ipv6_magic function prototype Chen, Kenneth W
2006-11-09 7:00 ` David Miller
2006-11-09 7:22 ` Al Viro
2006-11-09 7:55 ` David Miller
2006-11-13 8:52 ` Al Viro
2006-11-13 9:12 ` Russell King
2006-11-13 9:25 ` Al Viro [this message]
2006-11-13 9:37 ` Andi Kleen
2006-11-14 0:16 ` David Miller
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=20061113092515.GS29920@ftp.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=akpm@osdl.org \
--cc=davem@davemloft.net \
--cc=jgarzik@pobox.com \
--cc=kenneth.w.chen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--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).