From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 97DD36893 for ; Tue, 25 Feb 2014 11:56:28 +0100 (CET) Received: by mail-wg0-f41.google.com with SMTP id l18so213552wgh.12 for ; Tue, 25 Feb 2014 02:57:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:organization:to:subject:date:user-agent:cc :references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=78WduLgSGxlVssowsBOnX84CR2/RlssFTJhbK9Lc3YI=; b=Aw6lpeiUDUY2E10HYuFiKxn7L+VPd1sWf4lfCurueKXTvETcF8SiLpAU7lVz8Agt2i ryfM9uA51Ezdpg4XYAVTJ1cHQv2GO+49hS+aAc/+oc+ZylbMJbG4Z2h8D+KtCjn/LdEY GjEcuXpM2w3ChuhdDIIyc7lsOvvVbnBQmKmpgA532b5PkSQMn0pSDh3rHaK0+2UPrZlq 2v3lTZV8iC3aq0q07DudJKDtwN/YTq9JvFi2Aig9Phl0fRDQkU/F95lT7RqmnQY0Rd+c QJXA/no6PydjHttSbAOoqF6a9mvhPZW5p0mlW7z8VWuJpzDNUx2fWmFzsxUMpDE73ZF0 EUxg== X-Gm-Message-State: ALoCoQlNA05BRR1PGmT3LKpy/Tf4t59fH+3bLuM8CkTFmcu0F+W0f09Or+Ia2Z/mLcqlo4B++/zb X-Received: by 10.180.72.239 with SMTP id g15mr18877471wiv.45.1393325874355; Tue, 25 Feb 2014 02:57:54 -0800 (PST) Received: from angus.localnet (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id ha1sm49770768wjc.23.2014.02.25.02.57.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Feb 2014 02:57:53 -0800 (PST) From: Thomas Monjalon Organization: 6WIND To: "H. Peter Anvin" Date: Tue, 25 Feb 2014 11:57:51 +0100 User-Agent: KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; ) References: <1393322860-26310-1-git-send-email-hpa@zytor.com> In-Reply-To: <1393322860-26310-1-git-send-email-hpa@zytor.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201402251157.51697.thomas.monjalon@6wind.com> Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] hash: reverse the operand order to crc32 in rte_hash_crc.h X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2014 10:56:29 -0000 25/02/2014 11:07, H. Peter Anvin: > From: "H. Peter Anvin" > > 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 It was also reported by Pashupati Kumar . Acked and applied. Thanks -- Thomas