From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f181.google.com (mail-ob0-f181.google.com [209.85.214.181]) by dpdk.org (Postfix) with ESMTP id 1A9E8C572 for ; Fri, 19 Feb 2016 18:44:58 +0100 (CET) Received: by mail-ob0-f181.google.com with SMTP id jq7so114803901obb.0 for ; Fri, 19 Feb 2016 09:44:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=uWi+r7/d+/sHcSXV5IpIrlwGrcDWvGs6bFNzdUeVrhQ=; b=b115t8fEfpVXYOC1Wk7CqVZp5zGZr1vA7+tVxz3iiScLZ2jZ/CtidbDdwsQzgw3BgH Z0Xj8H/cO0Qe9qDj5JZ3GNuEPzDEq4rZ6MiDcdlm1EeM0RGG7hMD96TlVOhpmd5aN4a7 el9oDN4J/E9XYTfiO/5+Htz2Mchhs6nzMHlVhE70BSZcy8zJnIluPAgngZBhmXHCSKRy vfLdyjKjJOpxke4mM88wFa6Q2SLKp31zqj1eCY5pg/AWau4DFWtp3Cf5qIyo8LiK4Xmw wazSFTy1w/TxMS1tVtwOq5s3k7Gl384gtZjLWjS/KbMLHfRgmwdj7PL0Kt7qBc2VVnlr xbOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=uWi+r7/d+/sHcSXV5IpIrlwGrcDWvGs6bFNzdUeVrhQ=; b=Hyvcb4nG+dYI5drEVnQ6X4iPLZmYW6h0QY9c17qijZXawQP51HCoNDcUGPanpGKcdC t1ohWeSnsJuPwEDbWUE4eBoyZKq+k4BxpGlOTOb3+2Fk2AM2wiEtqTkv37aC0xckddfj 6yPzf/sZUbQNA4jYIYKaugG6uNNyxdALSHlAb3JITU4IqGlsxWGAfbnNDt22pEbABvjU b04NGD/+ndl/tUhrqb1cdzN7OhmJG4GPfrLt3J3eZ7+si572aflG0qZ8OIvRt/j6TMy2 IyBBlaEcM/cq0/ZcmDyWdG5RlUGSfrduG09wyGMPHuhPw1srtdCra+0CcNldOLNzax86 3oqA== X-Gm-Message-State: AG10YORjn5RBPwEZQsSC2d9ipAf0QBK7gZyuVawX2yAQ7+Fez+7JPeZvUuGJvz7Fh3/jZZqtw6lP2bqBXGx7wg== MIME-Version: 1.0 X-Received: by 10.60.116.169 with SMTP id jx9mr12518167oeb.30.1455903897464; Fri, 19 Feb 2016 09:44:57 -0800 (PST) Received: by 10.202.177.195 with HTTP; Fri, 19 Feb 2016 09:44:57 -0800 (PST) In-Reply-To: <1453954715-31723-1-git-send-email-zhihong.wang@intel.com> References: <1429562009-11817-1-git-send-email-rkerur@gmail.com> <1453954715-31723-1-git-send-email-zhihong.wang@intel.com> Date: Fri, 19 Feb 2016 09:44:57 -0800 Message-ID: From: Ravi Kerur To: Zhihong Wang Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [dpdk-dev,v2] Clean up rte_memcpy.h file 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: Fri, 19 Feb 2016 17:44:58 -0000 On Wed, Jan 27, 2016 at 8:18 PM, Zhihong Wang wrote: > > Remove unnecessary type casting in functions. > > > > Tested on Ubuntu (14.04 x86_64) with "make test". > > "make test" results match the results with baseline. > > "Memcpy perf" results match the results with baseline. > > > > Signed-off-by: Ravi Kerur > > Acked-by: Stephen Hemminger > > > > --- > > .../common/include/arch/x86/rte_memcpy.h | 340 > +++++++++++---------- > > 1 file changed, 175 insertions(+), 165 deletions(-) > > > > diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h > b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h > > index 6a57426..839d4ec 100644 > > --- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h > > +++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h > > [...] > > > /** > > @@ -150,13 +150,16 @@ rte_mov64blocks(uint8_t *dst, const uint8_t *src, > size_t n) > > __m256i ymm0, ymm1; > > > > while (n >= 64) { > > - ymm0 = _mm256_loadu_si256((const __m256i *)((const uint8_t > *)src + 0 * 32)); > > + > > + ymm0 = _mm256_loadu_si256((const __m256i *)(src + 0 * 32)); > > + ymm1 = _mm256_loadu_si256((const __m256i *)(src + 1 * 32)); > > + > > + _mm256_storeu_si256((__m256i *)(dst + 0 * 32), ymm0); > > + _mm256_storeu_si256((__m256i *)(dst + 1 * 32), ymm1); > > + > > Any particular reason to change the order of the statements here? :) > Overall this patch looks good. > Sorry for the late response. Let me double check and get back to you, it's been a while since I did the changes. > > n -= 64; > > - ymm1 = _mm256_loadu_si256((const __m256i *)((const uint8_t > *)src + 1 * 32)); > > - src = (const uint8_t *)src + 64; > > - _mm256_storeu_si256((__m256i *)((uint8_t *)dst + 0 * 32), > ymm0); > > - _mm256_storeu_si256((__m256i *)((uint8_t *)dst + 1 * 32), > ymm1); > > - dst = (uint8_t *)dst + 64; > > + src = src + 64; > > + dst = dst + 64; > > } > > } > > > >