public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Joe Perches <joe@perches.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Ling Ma <ling.ma.program@gmail.com>
Subject: Re: [PATCH net-next] net: move inet_dport/inet_num in sock_common
Date: Wed, 28 Nov 2012 03:55:12 +0000	[thread overview]
Message-ID: <1354074912.2701.43.camel@bwh-desktop.uk.solarflarecom.com> (raw)
In-Reply-To: <1354073514.8918.22.camel@joe-AO722>

On Tue, 2012-11-27 at 19:31 -0800, Joe Perches wrote:
> On Wed, 2012-11-28 at 03:12 +0000, Ben Hutchings wrote:
> > On Tue, 2012-11-27 at 18:23 -0800, Joe Perches wrote:
> > > OK, so it's an and not an or.  Duh.
> > [...]
> > 
> > The way to combine these sorts of comparisons is along the lines of:
> > 
> > (((left->a ^ right->a) |
> >   (left->b ^ right->b) |
> >   ...) == 0)
> > 
> > But when there are big-endian types involved, sparse is likely to
> > complain about combining them.
> 
> I believe there's only the 2 items that could be combined
> for cacheline purposes so using 2 logical tests with AND
> seems more readable.  Maybe a single combined test would
> be faster.  I don't have equipment at hand to test it.
> 
> If you prefer I supposed it could be converted.

I don't particularly care, and I gave up this trick myself because it
didn't seem worth fighting sparse.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

  reply	other threads:[~2012-11-28  3:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 15:06 [PATCH net-next] net: move inet_dport/inet_num in sock_common Eric Dumazet
2012-11-27 17:23 ` Joe Perches
2012-11-27 21:24   ` Eric Dumazet
2012-11-28  2:23     ` Joe Perches
2012-11-28  3:12       ` Ben Hutchings
2012-11-28  3:31         ` Joe Perches
2012-11-28  3:55           ` Ben Hutchings [this message]
2012-11-28  4:11       ` Eric Dumazet
2012-11-28 11:27         ` Eric Dumazet
2012-11-28 12:56           ` [PATCH v2 " Eric Dumazet
2012-11-28 16:48             ` David Miller
2012-11-28 17:02               ` David Miller
2012-11-28 17:18                 ` Eric Dumazet
2012-11-28 18:20             ` Eric Dumazet
2012-11-27 19:05 ` [PATCH " Ben Hutchings
2012-11-27 21:23   ` Eric Dumazet
2012-11-28  3:13     ` Eric Dumazet

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=1354074912.2701.43.camel@bwh-desktop.uk.solarflarecom.com \
    --to=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=joe@perches.com \
    --cc=ling.ma.program@gmail.com \
    --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