From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3D67D43AFA; Mon, 12 Feb 2024 18:56:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D0D65402BF; Mon, 12 Feb 2024 18:56:05 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 8A51740279 for ; Mon, 12 Feb 2024 18:56:04 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id C8D27207ECA2; Mon, 12 Feb 2024 09:56:03 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C8D27207ECA2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707760563; bh=NPcuSH4v+5W09IjXtZNcnAhZC0a2aVcp6C4xJPAKOXw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aRAHkQHFq29iYkXt/bJrACe442RgGwLCiFoe4VO18ATL5lD7iMMNnb3oAjaXDAPSP HHTjU9kAfvR5EQGoPypXwoFbpHo3Q4dNkIqp6COtJdfgc5O5IjyNw5ARmHt4qUpGse Y86Ww583csrooW6tVaiLBeeV0gjLRd3V86Xu/yL0= Date: Mon, 12 Feb 2024 09:56:03 -0800 From: Tyler Retzlaff To: dev@dpdk.org Cc: Bruce Richardson , Konstantin Ananyev Subject: Re: [PATCH] eal: remove unnecessary use of statement expression Message-ID: <20240212175603.GA1977@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1706660329-1752-1-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1706660329-1752-1-git-send-email-roretzla@linux.microsoft.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org ping could relevant maintainers take a look? thank you! On Tue, Jan 30, 2024 at 04:18:49PM -0800, Tyler Retzlaff wrote: > Remove use of statement expression syntax in expansion of > MOVEUNALIGNED_LEFT47_IMM and MOVEUNALIGNED_LEFT47 macro expansions. > > There appears to be no need to use the statement expression compiler > extension a simple block should work. > > Signed-off-by: Tyler Retzlaff > --- > lib/eal/x86/include/rte_memcpy.h | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/lib/eal/x86/include/rte_memcpy.h b/lib/eal/x86/include/rte_memcpy.h > index fd151be..72a9229 100644 > --- a/lib/eal/x86/include/rte_memcpy.h > +++ b/lib/eal/x86/include/rte_memcpy.h > @@ -610,7 +610,7 @@ > * - __m128i ~ must be pre-defined > */ > #define MOVEUNALIGNED_LEFT47_IMM(dst, src, len, offset) \ > -__extension__ ({ \ > +{ \ > size_t tmp; \ > while (len >= 128 + 16 - offset) { \ > xmm0 = _mm_loadu_si128((const __m128i *)(const void *)((const uint8_t *)src - offset + 0 * 16)); \ > @@ -656,7 +656,7 @@ > src = (const uint8_t *)src + tmp; \ > dst = (uint8_t *)dst + tmp; \ > } \ > -}) > +} > > /** > * Macro for copying unaligned block from one location to another, > @@ -671,7 +671,7 @@ > * - __m128i ~ used in MOVEUNALIGNED_LEFT47_IMM must be pre-defined > */ > #define MOVEUNALIGNED_LEFT47(dst, src, len, offset) \ > -__extension__ ({ \ > +{ \ > switch (offset) { \ > case 0x01: MOVEUNALIGNED_LEFT47_IMM(dst, src, n, 0x01); break; \ > case 0x02: MOVEUNALIGNED_LEFT47_IMM(dst, src, n, 0x02); break; \ > @@ -690,7 +690,7 @@ > case 0x0F: MOVEUNALIGNED_LEFT47_IMM(dst, src, n, 0x0F); break; \ > default:; \ > } \ > -}) > +} > > static __rte_always_inline void * > rte_memcpy_generic(void *dst, const void *src, size_t n) > -- > 1.8.3.1