DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: "H. Peter Anvin" <hpa@linux.intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] hash: reverse the operand order to crc32 in rte_hash_crc.h
Date: Tue, 25 Feb 2014 11:57:51 +0100	[thread overview]
Message-ID: <201402251157.51697.thomas.monjalon@6wind.com> (raw)
In-Reply-To: <1393322860-26310-1-git-send-email-hpa@zytor.com>

25/02/2014 11:07, H. Peter Anvin:
> From: "H. Peter Anvin" <hpa@linux.intel.com>
> 
> Checkin
> 
> a132a9cf2bcd440a974b9d3f5c44ba30b2c895a1 hash: use intrinsic
> 
> changed the rte_hash_crc.h from using the crc32 instruction via inline
> assembly to using an intrinsic.  The intrinsic should allow for better
> compiler performance, but the change did not account for the fact that
> the inline assembly being in AT&T syntax used the opposite operand
> order of the intrinsic.
> 
> This turns out to not matter for correctness, because the CRC32
> operation is commutative.  However, it could potentially matter for
> performance, because the loop is more efficient with the moving
> pointer in the source operand and the accumulation in the destination
> operand.
> 
> This was discovered by Jan Beulich when looking at the equivalent code
> in the Linux kernel.
> 
> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>

It was also reported by Pashupati Kumar <kumarp@brocade.com>.

Acked and applied.
Thanks
-- 
Thomas

      reply	other threads:[~2014-02-25 10:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25 10:07 H. Peter Anvin
2014-02-25 10:57 ` Thomas Monjalon [this message]

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=201402251157.51697.thomas.monjalon@6wind.com \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=hpa@linux.intel.com \
    /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).